Documentation
¶
Index ¶
- Variables
- func DumpProxyConnsInfo(ctx context.Context, wg *sync.WaitGroup)
- func InitializeCfg()
- func Reset()
- type Config
- func (c *Config) DeletePeerHash(peerKey string)
- func (c *Config) DeletePeerTurnCfg(peerKey string)
- func (c *Config) Dump()
- func (c *Config) GetAllProxyPeers() models.PeerConnMap
- func (c *Config) GetAllTurnPeersCfg() map[string]models.TurnPeerCfg
- func (c *Config) GetDevicePubKey() (publicKey wgtypes.Key)
- func (c *Config) GetIface() *wg.WGIface
- func (c *Config) GetIfaceDevice() wgtypes.Device
- func (c *Config) GetInterfaceListenPort() (port int)
- func (c *Config) GetPeer(peerPubKey string) (models.Conn, bool)
- func (c *Config) GetPeerInfoByHash(peerKeyHash string) (models.RemotePeer, bool)
- func (c *Config) GetPeerTurnCfg(peerKey string) (t models.TurnPeerCfg, ok bool)
- func (c *Config) GetTurnCfg() (t *models.TurnCfg)
- func (c *Config) IsIfaceNil() bool
- func (c *Config) RemovePeer(peerPubKey string)
- func (c *Config) ResetPeer(peerKey string)
- func (c *Config) SavePeer(connConf *models.Conn)
- func (c *Config) SavePeerByHash(peerInfo *models.RemotePeer)
- func (c *Config) SetIface(iface *wg.WGIface)
- func (c *Config) SetPeerTurnCfg(peerKey string, t models.TurnPeerCfg)
- func (c *Config) SetTurnCfg(t *models.TurnCfg)
- func (c *Config) UpdatePeer(updatedPeer *models.Conn)
- func (c *Config) UpdatePeerTurnAddr(peerKey string, addr string)
- func (c *Config) UpdatePeerTurnCfg(peerKey string, t models.TurnPeerCfg)
Constants ¶
This section is empty.
Variables ¶
var ( // DumpSignalChan - channel to signal dump proxy conns info DumpSignalChan = make(chan struct{}, 5) )
Functions ¶
func DumpProxyConnsInfo ¶ added in v0.20.5
func InitializeCfg ¶
func InitializeCfg()
InitializeCfg - intializes all the variables and sets defaults
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config - struct for proxy config
func (*Config) DeletePeerHash ¶
Config.DeletePeerHash - deletes peer by its pubkey hash from config
func (*Config) DeletePeerTurnCfg ¶ added in v0.19.0
Config.DeleteTurnCfg - deletes the turn config
func (*Config) Dump ¶ added in v0.18.6
func (c *Config) Dump()
Config.Dump - dumps the proxy peer connections information
func (*Config) GetAllProxyPeers ¶
func (c *Config) GetAllProxyPeers() models.PeerConnMap
Config.GetAllProxyPeers - fetches all peers in the network
func (*Config) GetAllTurnPeersCfg ¶ added in v0.19.0
func (c *Config) GetAllTurnPeersCfg() map[string]models.TurnPeerCfg
Config.GetAllTurnPeersCfg - fetches all peers using turn
func (*Config) GetDevicePubKey ¶
Config.GetDevicePubKey - fetches device public key
func (*Config) GetIfaceDevice ¶
Config.GetGetIfaceDeviceIface - gets the wg device value
func (*Config) GetInterfaceListenPort ¶
Config.GetInterfaceListenPort - fetches interface listen port from config
func (*Config) GetPeerInfoByHash ¶
func (c *Config) GetPeerInfoByHash(peerKeyHash string) (models.RemotePeer, bool)
Config.GetPeerInfoByHash - fetches the peerInfo by its pubKey hash
func (*Config) GetPeerTurnCfg ¶ added in v0.19.0
func (c *Config) GetPeerTurnCfg(peerKey string) (t models.TurnPeerCfg, ok bool)
Config.GetPeerTurnCfg - gets the peer turn cfg
func (*Config) GetTurnCfg ¶ added in v0.19.0
Config.GetTurnCfg - gets the turn config
func (*Config) IsIfaceNil ¶
Config.IsIfaceNil - checks if ifconfig is nil in the memory config
func (*Config) RemovePeer ¶
Config.RemovePeer - removes the peer from the network peer config
func (*Config) SavePeerByHash ¶
func (c *Config) SavePeerByHash(peerInfo *models.RemotePeer)
Config.SavePeerByHash - saves peer by its publicKey hash to the config
func (*Config) SetPeerTurnCfg ¶ added in v0.19.0
func (c *Config) SetPeerTurnCfg(peerKey string, t models.TurnPeerCfg)
Config.SetPeerTurnCfg - sets the peer turn cfg
func (*Config) SetTurnCfg ¶ added in v0.19.0
Config.SetTurnCfg - sets the turn config
func (*Config) UpdatePeer ¶
Config.UpdatePeer - updates peer by network
func (*Config) UpdatePeerTurnAddr ¶ added in v0.19.0
func (*Config) UpdatePeerTurnCfg ¶ added in v0.19.0
func (c *Config) UpdatePeerTurnCfg(peerKey string, t models.TurnPeerCfg)
Config.UpdatePeerTurnCfg - updates the peer turn cfg