Documentation ¶
Index ¶
- type Guard
- func (guard *Guard) CleanupPeers() error
- func (guard *Guard) DeletePeer(uuid string) (err error)
- func (guard *Guard) DeleteRedisPeer(uuid string, publicKey string) error
- func (guard *Guard) FormatUpdateStorage(oldStorage map[string]string, newStorage map[string]interface{}) (storage map[string]string)
- func (guard *Guard) GetGroupPeers(group string) (peers map[string]*Peer, err error)
- func (guard *Guard) GetPeers() (peers map[string]*Peer, err error)
- func (guard *Guard) GetRedisPeer(id string) (*RedisPeer, error)
- func (guard *Guard) GetRedisPeerGroup(group string) (peers []string, err error)
- func (guard *Guard) GetRedisPeerMap() (peers map[string]string, err error)
- func (guard *Guard) GetWgPeer(id string) (*Peer, error)
- func (guard *Guard) SetPeer(peer *Peer) (err error)
- func (guard *Guard) SetRedisPeer(peer *RedisPeer) error
- func (guard *Guard) UpdatePeer(peer *Peer) (err error)
- type Peer
- type RedisPeer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
func CreateGuard ¶
func (*Guard) CleanupPeers ¶
func (*Guard) DeletePeer ¶
func (*Guard) DeleteRedisPeer ¶
func (*Guard) FormatUpdateStorage ¶
func (*Guard) GetGroupPeers ¶
func (*Guard) GetRedisPeerGroup ¶
func (*Guard) GetRedisPeerMap ¶
func (*Guard) SetRedisPeer ¶
func (*Guard) UpdatePeer ¶
type Peer ¶
type Peer struct { Uuid string `json:"uuid"` Group string `json:"group"` Name string `json:"name"` Description string `json:"description"` PublicKey string AllowedIPs []net.IPNet `json:"allowedIPs"` KeepAlive time.Duration `json:"keepAlive"` LastHandshake time.Time `json:"lastSeen"` LastEndpoint string `json:"lastExternalIp"` Storage map[string]string `json:"storage"` }
Click to show internal directories.
Click to hide internal directories.