wiredaemon

package
v0.0.0-...-984f6f0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, cfg *Config) wirer.DaemonWirer

Types

type Config

type Config struct {
	//PodCache wire.Cache[pod.Pod]
	XDP xdp.XDP
	CRI cri.CRI
}

type Endpoint

type Endpoint struct {
	// contains filtered or unexported fields
}

func NewEndpoint

func NewEndpoint(ctx context.Context, cfg *EndpointConfig) Endpoint

func (Endpoint) DeployEp2Node

func (r Endpoint) DeployEp2Node() error

func (Endpoint) DeployNode2Node

func (r Endpoint) DeployNode2Node(peerEp Endpoint) error

func (Endpoint) DestroyEp2Node

func (r Endpoint) DestroyEp2Node() error

func (Endpoint) DestroyNode2Node

func (r Endpoint) DestroyNode2Node() error

Destroy destroys the endpoint for local endpoints it deletes the veth itfce from the container ns for remote endpoints it deletes the tun interface and xdp

func (Endpoint) SetMAC

func (r Endpoint) SetMAC(mac net.HardwareAddr)

type EndpointConfig

type EndpointConfig struct {
	IfName string
	//IsReady bool // the container nsPath is available to communicate with
	IsLocal bool // the endpoint is local to the host
	NsPath  string
	HostIP  string
}

type WireEp2Node

type WireEp2Node interface {
	IsReady() bool
	Deploy(ctx context.Context, req *endpointpb.EndpointRequest) error
	Destroy(ctx context.Context, req *endpointpb.EndpointRequest) error
}

func NewWireEp2Node

func NewWireEp2Node(ctx context.Context, nsPath string, cfg *WireEp2NodeConfig) WireEp2Node

type WireEp2NodeConfig

type WireEp2NodeConfig struct {
	// TODO container Cache -> keep a local cache evertime
	// we query to avoid going to CRI all the time
	CRI cri.CRI
}

type WireNode2Node

type WireNode2Node interface {
	Deploy() error
	Destroy() error
}

type WireNode2NodeConfig

type WireNode2NodeConfig struct {
	// TODO container Cache -> keep a local cache evertime
	// we query to avoid going to CRI all the time
	XDP xdp.XDP
	CRI cri.CRI
}

Jump to

Keyboard shortcuts

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