Documentation ¶
Index ¶
- type Consul
- func (cb *Consul) AddPeer(location string, wgInterface wireguard.Interface, peer wireguard.Peer) error
- func (cb *Consul) GetPeers(location string) ([]wireguard.Peer, error)
- func (cb *Consul) Lock(location string, value string) error
- func (cb *Consul) MonitorKv(location string, wgInterface wireguard.Interface)
- func (cb *Consul) MonitorNodes(location string, wgInterface wireguard.Interface)
- func (cb *Consul) Unlock()
- type ConsulService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consul ¶
type Consul struct {
// contains filtered or unexported fields
}
func (*Consul) MonitorNodes ¶
type ConsulService ¶
type ConsulService interface { //location can be a key for K/V stores or table for databases,.... Lock(location string, value string) error //unlock the lock Unlock() //get all peers GetPeers(location string) ([]wireguard.Peer, error) // add a peer AddPeer(location string, wgInterface wireguard.Interface, peer wireguard.Peer) error // monitor the K/V store for changes MonitorKv(location string, wgInterface wireguard.Interface) // monitor the nodes for changes MonitorNodes(location string, wgInterface wireguard.Interface) }
Click to show internal directories.
Click to hide internal directories.