Documentation ¶
Index ¶
- type Backend
- type ConsulBackend
- func (cb *ConsulBackend) AddPeer(location string, wgInterface wireguard.Interface, peer wireguard.Peer) error
- func (cb *ConsulBackend) GetPeers(location string) ([]wireguard.Peer, error)
- func (cb *ConsulBackend) Lock(location string, value string) error
- func (cb *ConsulBackend) MonitorKv(location string, wgInterface wireguard.Interface)
- func (cb *ConsulBackend) MonitorNodes(location string, wgInterface wireguard.Interface)
- func (cb *ConsulBackend) Unlock()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { //location can be a key for K/V stores or table for databases,.... Lock(location string, value string) error Unlock() GetPeers(location string) ([]wireguard.Peer, error) AddPeer(location string, wgInterface wireguard.Interface, peer wireguard.Peer) error MonitorKv(location string, wgInterface wireguard.Interface) MonitorNodes(location string, wgInterface wireguard.Interface) }
type ConsulBackend ¶
type ConsulBackend struct {
// contains filtered or unexported fields
}
func NewConsulBackend ¶
func NewConsulBackend(endpoint string) (*ConsulBackend, error)
func (*ConsulBackend) GetPeers ¶
func (cb *ConsulBackend) GetPeers(location string) ([]wireguard.Peer, error)
func (*ConsulBackend) MonitorKv ¶ added in v0.2.1
func (cb *ConsulBackend) MonitorKv(location string, wgInterface wireguard.Interface)
func (*ConsulBackend) MonitorNodes ¶ added in v0.2.1
func (cb *ConsulBackend) MonitorNodes(location string, wgInterface wireguard.Interface)
func (*ConsulBackend) Unlock ¶
func (cb *ConsulBackend) Unlock()
Click to show internal directories.
Click to hide internal directories.