hooks

package
v0.5.45 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Get = daemon.RegisterFeature(New, 70) //nolint:gochecknoglobals

Functions

This section is empty.

Types

type ExecHook

type ExecHook struct {
	*config.ExecHookSetting
	// contains filtered or unexported fields
}

func (*ExecHook) OnInterfaceAdded

func (h *ExecHook) OnInterfaceAdded(i *daemon.Interface)

func (*ExecHook) OnInterfaceModified

func (h *ExecHook) OnInterfaceModified(i *daemon.Interface, oldIntf *wg.Interface, m daemon.InterfaceModifier)

func (*ExecHook) OnInterfaceRemoved

func (h *ExecHook) OnInterfaceRemoved(i *daemon.Interface)

func (*ExecHook) OnPeerAdded

func (h *ExecHook) OnPeerAdded(p *daemon.Peer)

func (*ExecHook) OnPeerModified

func (h *ExecHook) OnPeerModified(p *daemon.Peer, old *wgtypes.Peer, m daemon.PeerModifier, ipsAdded, ipsRemoved []net.IPNet)

func (*ExecHook) OnPeerRemoved

func (h *ExecHook) OnPeerRemoved(p *daemon.Peer)

func (*ExecHook) OnPeerStateChanged

func (h *ExecHook) OnPeerStateChanged(p *daemon.Peer, newState, prevState daemon.PeerState)

type Hook

type Interface

type Interface struct {
	*daemon.Interface
	// contains filtered or unexported fields
}

func New

func New(i *daemon.Interface) (*Interface, error)

func (*Interface) Close

func (i *Interface) Close() error

func (*Interface) NewExecHook

func (i *Interface) NewExecHook(cfg *config.ExecHookSetting) *ExecHook

func (*Interface) NewWebHook

func (i *Interface) NewWebHook(cfg *config.WebHookSetting) *WebHook

func (*Interface) Start

func (i *Interface) Start() error

type WebHook

type WebHook struct {
	*config.WebHookSetting
	// contains filtered or unexported fields
}

func (*WebHook) OnInterfaceAdded

func (h *WebHook) OnInterfaceAdded(i *daemon.Interface)

func (*WebHook) OnInterfaceModified

func (h *WebHook) OnInterfaceModified(i *daemon.Interface, _ *wg.Interface, m daemon.InterfaceModifier)

func (*WebHook) OnInterfaceRemoved

func (h *WebHook) OnInterfaceRemoved(i *daemon.Interface)

func (*WebHook) OnPeerAdded

func (h *WebHook) OnPeerAdded(p *daemon.Peer)

func (*WebHook) OnPeerModified

func (h *WebHook) OnPeerModified(p *daemon.Peer, _ *wgtypes.Peer, m daemon.PeerModifier, _, _ []net.IPNet)

func (*WebHook) OnPeerRemoved

func (h *WebHook) OnPeerRemoved(p *daemon.Peer)

func (*WebHook) OnPeerStateChanged

func (h *WebHook) OnPeerStateChanged(p *daemon.Peer, _, _ daemon.PeerState)

Jump to

Keyboard shortcuts

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