runmode

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkState

type LinkState struct {
	State   string
	Message string
}

type RunMode

type RunMode interface {
	Name() string
	Env() RunModeEnv

	Start() error
	Setup() error
	HandleDNSPropagation(klink *api.KubeLink)
	GetInterface() netlink.Link
	UpdateLocalGatewayInfo(*controllers.LocalGatewayInfo)
	GetErrorForMeshNode(ip net.IP) error
	RequiredIPTablesChains() iptables.Requests
	ReconcileInterface(logger logger.LogContext) error
	GetLinkState(klink *api.KubeLink) LinkState
	Cleanup() error
}

func NewNoneMode

func NewNoneMode(env RunModeEnv) (RunMode, error)

type RunModeBase

type RunModeBase struct {
	RunModeEnv
	// contains filtered or unexported fields
}

func NewRunModeBase

func NewRunModeBase(name string, env RunModeEnv) RunModeBase

func (*RunModeBase) Cleanup

func (this *RunModeBase) Cleanup() error

func (*RunModeBase) Debugf

func (this *RunModeBase) Debugf(msgfmt string, args ...interface{})

func (*RunModeBase) Env

func (this *RunModeBase) Env() RunModeEnv

func (*RunModeBase) Errorf

func (this *RunModeBase) Errorf(msgfmt string, args ...interface{})

func (*RunModeBase) GetErrorForMeshNode

func (this *RunModeBase) GetErrorForMeshNode(ip net.IP) error

func (*RunModeBase) GetInterface

func (this *RunModeBase) GetInterface() netlink.Link

func (*RunModeBase) GetLinkState

func (this *RunModeBase) GetLinkState(klink *api.KubeLink) LinkState

func (*RunModeBase) HandleDNSPropagation

func (this *RunModeBase) HandleDNSPropagation(klink *api.KubeLink)

func (*RunModeBase) Infof

func (this *RunModeBase) Infof(msgfmt string, args ...interface{})

func (*RunModeBase) Name

func (this *RunModeBase) Name() string

func (*RunModeBase) ReconcileInterface

func (this *RunModeBase) ReconcileInterface(logger logger.LogContext) error

func (*RunModeBase) RequiredIPTablesChains

func (this *RunModeBase) RequiredIPTablesChains() iptables.Requests

func (*RunModeBase) Setup

func (this *RunModeBase) Setup() error

func (*RunModeBase) Start

func (this *RunModeBase) Start() error

func (*RunModeBase) UpdateLocalGatewayInfo

func (this *RunModeBase) UpdateLocalGatewayInfo(*controllers.LocalGatewayInfo)

type RunModeEnv

type RunModeEnv interface {
	Controller() controller.Interface
	Config() *config.Config
	LinkTool() *controllers.LinkTool
	Secrets() *controllers.SecretCache
	Tasks() tasks.Tasks
	Links() kubelink.Links

	GetAccess() kubelink.LinkAccessInfo
	GetDNSInfo() kubelink.LinkDNSInfo

	TriggerUpdate()
	TriggerLink(kubelink.LinkName)
	UpdateLinkInfo(logger logger.LogContext, name kubelink.LinkName, access *kubelink.LinkAccessInfo, dns *kubelink.LinkDNSInfo)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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