daemon

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BYTE = 1 << (10 * iota)
	KILOBYTE
	MEGABYTE
	GIGABYTE
	TERABYTE
)

bandwidth limit unit

View Source
const (
	IfEth0 = "eth0"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, socketFilePath, debugSocketListen, configFilePath, daemonMode, logLevel string) error

Run terway daemon

Types

type AllocCtx added in v1.2.1

type AllocCtx struct {
	Trace []Trace
}

func (*AllocCtx) String added in v1.2.1

func (a *AllocCtx) String() string

type ENI added in v1.0.10

type ENI struct {
	*types.ENI
	// contains filtered or unexported fields
}

ENI to hold ENI's secondary config

type ENIIP added in v1.0.10

type ENIIP struct {
	*types.ENIIP
	// contains filtered or unexported fields
}

ENIIP the secondary ip of eni

type Kubernetes added in v1.0.10

type Kubernetes interface {
	GetLocalPods() ([]*types.PodInfo, error)
	GetPod(namespace, name string) (*types.PodInfo, error)
	GetServiceCIDR() *types.IPNetSet
	GetNodeCidr() *types.IPNetSet
	SetNodeAllocatablePod(count int) error
	PatchEipInfo(info *types.PodInfo) error

	PatchNodeAnnotations(anno map[string]string) error
	PatchPodIPInfo(info *types.PodInfo, ips string) error
	PatchNodeIPResCondition(status corev1.ConditionStatus, reason, message string) error
	WaitPodENIInfo(info *types.PodInfo) (podEni *podENITypes.PodENI, err error)
	GetPodENIInfo(info *types.PodInfo) (podEni *podENITypes.PodENI, err error)
	RecordNodeEvent(eventType, reason, message string)
	RecordPodEvent(podName, podNamespace, eventType, reason, message string) error
	GetNodeDynamicConfigLabel() string
	GetDynamicConfigWithName(name string) (string, error)
	SetCustomStatefulWorkloadKinds(kinds []string) error
	WaitTrunkReady() (string, error)

	GetTrunkID() string

	GetClient() client.Client
}

Kubernetes operation set

type ResourceManager added in v1.0.10

type ResourceManager interface {
	Allocate(context *networkContext, prefer string) (types.NetworkResource, error)
	Release(context *networkContext, resItem types.ResourceItem) error
	GarbageCollection(inUseResSet map[string]types.ResourceItem, expireResSet map[string]types.ResourceItem) error
	Stat(context *networkContext, resID string) (types.NetworkResource, error)
	tracing.ResourceMappingHandler
}

ResourceManager Allocate/Release/Pool/Stick/GC pod resource managed pod and resource relationship

type Trace added in v1.2.1

type Trace struct {
	Msg string
}

Jump to

Keyboard shortcuts

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