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 MigrateLocalPodDB ¶
func MigrateLocalPodDB() error
MigrateLocalPodDB migrate local Pod persistence DB to the current version.
func NewKubernetesClient ¶
func NewKubernetesClient() (*kubernetes.Clientset, error)
NewKubernetesClient creates a kubernetes client.
Types ¶
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.
Click to show internal directories.
Click to hide internal directories.