daemon

package
v1.6.2-rc Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDebugSocketPath is the default path of debug socket.
	DefaultDebugSocketPath = "/var/run/cello/cello_debug.socket"
	// PodsGetPath is the HTTP path to get pods.
	PodsGetPath = "/pod/get"
	// IPAMSnapshotGetPath is the HTTP path to get ipam snapshot.
	IPAMSnapshotGetPath = "/ipam/snapshot/get"
	// IPAMStatusGetPath is the HTTP path to get ipam status.
	IPAMStatusGetPath = "/ipam/status/get"
	// IPAMLimitGetPath is the HTTP path to get ipam limit.
	IPAMLimitGetPath = "/ipam/limit/get"
	// ConfigGetPath is the HTTP path to get config.
	ConfigGetPath = "/config/get"
	// ConfigLogLevelSetPath is the HTTP path to set log level.
	ConfigLogLevelSetPath = "/config/log/level/set"
	// ConfigSubnetStatusGetPath is the HTTP path to get subnet status.
	ConfigSubnetStatusGetPath = "/config/subnet/status/get"
	// ConfigSecurityGrpStatusGetPath is the HTTP path to get security group status.
	ConfigSecurityGrpStatusGetPath = "/config/securityGrp/status/get"
	// EcsMetaInfoGetPath is the HTTP path to get ecs meta info.
	EcsMetaInfoGetPath = "/ecs/info/get"
	// TaskStatusGetPath is the HTTP path to get task status.
	TaskStatusGetPath = "/task/status/get"
)
View Source
const (
	DefaultSocketPath = "/var/run/cello/cni.socket"
)

Variables

View Source
var ErrLegacy = errors.New("legacy resource")

Functions

func Execute

func Execute()

func IsMain

func IsMain(ifName string) bool

func MigrateLocalPodDB

func MigrateLocalPodDB() error

MigrateLocalPodDB migrate local Pod persistence DB to the current version.

func NewDaemon

func NewDaemon() (*daemon, error)

func NewKubernetesClient

func NewKubernetesClient() (*kubernetes.Clientset, error)

NewKubernetesClient creates a kubernetes client.

Types

type ENI

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

ENI is ENI holder in eni factory.

type ENIIPRes

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

type Handler

type Handler interface {
	Handle(c *gin.Context)
}

Handler is the interface to handle http request.

type PodPersistenceManager

type PodPersistenceManager interface {
	// Get returns the pod with the given namespace and name.
	Get(podNamespace, podName string) (*types.Pod, error)
	// List returns all pods.
	List() ([]*types.Pod, error)
	// Put persists the given pod.
	Put(pod *types.Pod) error
	// Delete deletes the pod with the given namespace and name.
	Delete(podNamespace, podName string) error
	// Close closes the persistence manager.
	Close()
}

PodPersistenceManager is the interface to persist pod information.

type ResourceManager

type ResourceManager interface {
	// Name returns the name of the resource manager.
	Name() string
	// Allocate allocates a NetResource.
	Allocate(ctx *netContext, prefer string) (types.NetResource, error)
	// Release releases the given NetResource.
	Release(ctx *netContext, resource *types.VPCResource) error
	// GetSnapshot returns the snapshot of the resource manager.
	GetSnapshot() (pool.ResourcePoolSnapshot, error)
	// GetPoolStatus returns the status of the resource pool.
	GetPoolStatus() pool.Status
	// GetResourceLimit returns the limit of the resource manager.
	GetResourceLimit() int
}

ResourceManager is the interface to manage network resources.

Jump to

Keyboard shortcuts

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