Documentation ¶
Index ¶
- type WgUApiClient
- func (c *WgUApiClient) CheckInterface(iface string) error
- func (c *WgUApiClient) Close(iface string) error
- func (c *WgUApiClient) CloseAll() error
- func (c *WgUApiClient) CloseSocket(iface string)
- func (c *WgUApiClient) DownInterface(iface string) error
- func (c *WgUApiClient) UpInterface(iface string) error
- func (c *WgUApiClient) UpdateConfig(iface string, replacePeers bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WgUApiClient ¶
type WgUApiClient struct { base_client.WGClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(baseClient *base_client.WGClient) *WgUApiClient
func (*WgUApiClient) CheckInterface ¶
func (c *WgUApiClient) CheckInterface(iface string) error
func (*WgUApiClient) Close ¶
func (c *WgUApiClient) Close(iface string) error
func (*WgUApiClient) CloseAll ¶
func (c *WgUApiClient) CloseAll() error
func (*WgUApiClient) CloseSocket ¶
func (c *WgUApiClient) CloseSocket(iface string)
func (*WgUApiClient) DownInterface ¶
func (c *WgUApiClient) DownInterface(iface string) error
func (*WgUApiClient) UpInterface ¶
func (c *WgUApiClient) UpInterface(iface string) error
func (*WgUApiClient) UpdateConfig ¶
func (c *WgUApiClient) UpdateConfig(iface string, replacePeers bool) error
Takes a list of peer configs and applies the config to the server specified. Peers are not replaced, instead the peer configs indicate whether a peer should be removed or appended to the server. Rotating peers works by passing both the stale and new configs as part of the peer list, with the toRemove flag indicating what to do (see GetWgPeer).
Click to show internal directories.
Click to hide internal directories.