routedriver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouteDriver

func RegisterRouteDriver(name string, factory Factory)

Types

type Config

type Config struct {
	NodeName   string
	Client     *clientset.Clientset
	Kubeconfig *rest.Config
}

type Driver

type Driver interface {
	// Init inits the driver. If return an error, raven agent will exit.
	Init() error
	// Apply applies the given network to the cluster, which represents the desired state of the cluster.
	// If return an error, the caller is expected to retry again later.
	// Usually, the implementation should compare the current network state with the given desired state,
	// and make changes to reach the desired state.
	// This method should be idempotent.
	Apply(network *types.Network, vpnDriverMTUFn func() (int, error)) error
	// MTU return Minimal MTU in route driver
	MTU(network *types.Network) (int, error)
	// Cleanup performs the necessary uninstallation.
	Cleanup() error
}

Driver is the interface for inner gateway routing mechanism.

func New

func New(name string, cfg *config.Config) (Driver, error)

type Factory

type Factory func(cfg *config.Config) (Driver, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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