daemon

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 64 Imported by: 5

Documentation

Index

Constants

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

bandwidth limit unit

Variables

This section is empty.

Functions

func Run

func Run(pidFilePath, socketFilePath, debugSocketListen, configFilePath, kubeconfig, master, daemonMode, logLevel string) error

Run terway daemon

Types

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 Item added in v1.1.0

type Item struct {
	Key string
	Val int
}

Item is the element type of MapSorter, which contains the values for sorting

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
	PatchTrunkInfo(trunkEni 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)
	SetSvcCidr(svcCidr *types.IPNetSet) error
	SetCustomStatefulWorkloadKinds(kinds []string) error
}

Kubernetes operation set

type MapSorter added in v1.1.0

type MapSorter []Item

MapSorter is a slice container for sorting

func (MapSorter) SortInDescendingOrder added in v1.1.0

func (ms MapSorter) SortInDescendingOrder()

SortInDescendingOrder is a bubble sort per element's value

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

Jump to

Keyboard shortcuts

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