Documentation
¶
Index ¶
- type Conf
- func (conf Conf) AddHooks()
- func (conf Conf) AddUserHooks(name string, env string)
- func (conf Conf) Log()
- func (conf Conf) Oneshot() bool
- func (conf Conf) RunExitHook(ctx context.Context, name string)
- func (conf Conf) RunExitHooks(ctx context.Context)
- func (conf Conf) RunInitHook(ctx context.Context, name string)
- func (conf Conf) RunInitHooks(ctx context.Context)
- type Hook
- type HookMulti
- type HookSingle
- type IPRouteHook
- type Nat4Hook
- type UserHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conf ¶
type Conf struct {
// contains filtered or unexported fields
}
Configuration
func (Conf) AddUserHooks ¶
Add a new hook to the configuration
func (Conf) RunExitHook ¶
Run an exit hook
func (Conf) RunInitHook ¶
Run an init hook
type Hook ¶
type Hook interface {
String() []string
RunInit(context.Context) error
RunExit(context.Context) error
}
init & exit hooks iface
type HookMulti ¶
type HookMulti struct {
// contains filtered or unexported fields
}
init & exit hooks
func NewIPRouteHooks ¶
Create init & exit hooks
func NewUserHooks ¶
Create init & exit hooks
type HookSingle ¶
init or exit hook iface
type IPRouteHook ¶
type IPRouteHook struct {
// contains filtered or unexported fields
}
IP Route Hook
func NewIPRouteHook ¶
func NewIPRouteHook(name string, env string) IPRouteHook
Create an IP Route Hook
func (IPRouteHook) Run ¶
func (hook IPRouteHook) Run(ctx context.Context) error
Run the hook if it is set
func (IPRouteHook) String ¶
func (hook IPRouteHook) String() []string
Returns hook information in an human format
type Nat4Hook ¶
type Nat4Hook struct {
// contains filtered or unexported fields
}
IPv4 NAT Hook
type UserHook ¶
type UserHook struct {
// contains filtered or unexported fields
}
Hook
func NewUserHook ¶
Creates a new Hook from environment variables
Click to show internal directories.
Click to hide internal directories.