Documentation ¶
Overview ¶
Package siderolink provides controllers which manage file resources.
Index ¶
- Constants
- type ConfigController
- type ManagerController
- type StatusController
- type UserspaceWireguardController
- func (ctrl *UserspaceWireguardController) Inputs() []controller.Input
- func (ctrl *UserspaceWireguardController) Name() string
- func (ctrl *UserspaceWireguardController) Outputs() []controller.Output
- func (ctrl *UserspaceWireguardController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error
- type WireguardClient
Constants ¶
const DefaultStatusUpdateInterval = 30 * time.Second
DefaultStatusUpdateInterval is the default interval between status updates.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigController ¶ added in v1.4.2
type ConfigController struct { Cmdline *procfs.Cmdline V1Alpha1Mode v1alpha1runtime.Mode }
ConfigController interacts with SideroLink API and brings up the SideroLink Wireguard interface.
func (*ConfigController) Inputs ¶ added in v1.4.2
func (ctrl *ConfigController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*ConfigController) Name ¶ added in v1.4.2
func (ctrl *ConfigController) Name() string
Name implements controller.Controller interface.
func (*ConfigController) Outputs ¶ added in v1.4.2
func (ctrl *ConfigController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*ConfigController) Run ¶ added in v1.4.2
func (ctrl *ConfigController) Run(ctx context.Context, r controller.Runtime, _ *zap.Logger) error
Run implements controller.Controller interface.
type ManagerController ¶
type ManagerController struct {
// contains filtered or unexported fields
}
ManagerController interacts with SideroLink API and brings up the SideroLink Wireguard interface.
func (*ManagerController) Inputs ¶
func (ctrl *ManagerController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*ManagerController) Name ¶
func (ctrl *ManagerController) Name() string
Name implements controller.Controller interface.
func (*ManagerController) Outputs ¶
func (ctrl *ManagerController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*ManagerController) Run ¶
func (ctrl *ManagerController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error
Run implements controller.Controller interface.
type StatusController ¶ added in v1.8.0
type StatusController struct { // WGClientFunc is a function that returns a WireguardClient. // // When nil, it defaults to an actual Wireguard client. WGClientFunc func() (WireguardClient, error) // Interval is the time between peer status checks. // // When zero, it defaults to DefaultStatusUpdateInterval. Interval time.Duration }
StatusController reports siderolink status.
func (*StatusController) Inputs ¶ added in v1.8.0
func (ctrl *StatusController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*StatusController) Name ¶ added in v1.8.0
func (ctrl *StatusController) Name() string
Name implements controller.Controller interface.
func (*StatusController) Outputs ¶ added in v1.8.0
func (ctrl *StatusController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*StatusController) Run ¶ added in v1.8.0
func (ctrl *StatusController) Run(ctx context.Context, r controller.Runtime, _ *zap.Logger) error
Run implements controller.Controller interface.
type UserspaceWireguardController ¶ added in v1.7.0
UserspaceWireguardController imlements a controller that manages a Wireguard over GRPC tunnel in userspace.
func (*UserspaceWireguardController) Inputs ¶ added in v1.7.0
func (ctrl *UserspaceWireguardController) Inputs() []controller.Input
Inputs implements controller.Controller interface.
func (*UserspaceWireguardController) Name ¶ added in v1.7.0
func (ctrl *UserspaceWireguardController) Name() string
Name implements controller.Controller interface.
func (*UserspaceWireguardController) Outputs ¶ added in v1.7.0
func (ctrl *UserspaceWireguardController) Outputs() []controller.Output
Outputs implements controller.Controller interface.
func (*UserspaceWireguardController) Run ¶ added in v1.7.0
func (ctrl *UserspaceWireguardController) Run(ctx context.Context, r controller.Runtime, logger *zap.Logger) error
Run implements controller.Controller interface.