backend

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2022 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

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) AddPeer

func (cb *ConsulBackend) AddPeer(location string, wgInterface wireguard.Interface, peer wireguard.Peer) error

func (*ConsulBackend) GetPeers

func (cb *ConsulBackend) GetPeers(location string) ([]wireguard.Peer, error)

func (*ConsulBackend) Lock

func (cb *ConsulBackend) Lock(location string, value string) 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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL