From 4aee69385d30431400c3cac08243b4c38334836a Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 22 Aug 2023 15:56:22 +0000 Subject: [PATCH] zones: RingInfo [WIP] Signed-off-by: Alejandro Mery --- pkg/zones/rings.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkg/zones/rings.go b/pkg/zones/rings.go index 1eb36e8..fa3cdd2 100644 --- a/pkg/zones/rings.go +++ b/pkg/zones/rings.go @@ -1,6 +1,10 @@ package zones -import "net/netip" +import ( + "net/netip" + + "git.jpi.io/amery/jpictl/pkg/wireguard" +) const ( // MaxZoneID indicates the highest ID allowed for a Zone @@ -11,6 +15,15 @@ const ( RingsCount = 2 ) +// RingInfo contains represents the Wireguard endpoint details +// for a Machine on a particular ring +type RingInfo struct { + Ring int + Enabled bool + Keys *wireguard.KeyPair + Address netip.Addr +} + // RingAddressEncoder provides encoder/decoder access for a particular // Wireguard ring type RingAddressEncoder struct {