Documentation

Index

Constants

View Source
const (
	DefaultResourceName = "aliyun/eni"
)

Variables

View Source
var DefaultEcsBackoff = wait.Backoff{
	Steps:    5,
	Duration: 500 * time.Millisecond,
	Jitter:   1.0,
}

Functions

func GetEniCapByInstanceType

func GetEniCapByInstanceType(instanceType string, ecsClient *ecs.Client, floatingRatio float64, shift int) (int, error)

Types

type EniDevicePlugin

type EniDevicePlugin struct {
	sync.Locker
	// contains filtered or unexported fields
}

    EniDevicePlugin implements the Kubernetes device plugin API

    func NewEniDevicePlugin

    func NewEniDevicePlugin(count int) *EniDevicePlugin

      NewEniDevicePlugin returns an initialized EniDevicePlugin

      func (*EniDevicePlugin) Allocate

        Allocate which return list of devices.

        func (*EniDevicePlugin) GetDevicePluginOptions

        func (*EniDevicePlugin) ListAndWatch

          ListAndWatch lists devices and update that list according to the health status

          func (*EniDevicePlugin) Register

          func (m *EniDevicePlugin) Register(request pluginapi.RegisterRequest) error

            Register registers the device plugin for the given resourceName with Kubelet.

            func (*EniDevicePlugin) Serve

            func (m *EniDevicePlugin) Serve(resourceName string) error

              Serve starts the gRPC server and register the device plugin to Kubelet

              func (*EniDevicePlugin) Start

              func (m *EniDevicePlugin) Start() error

                Start starts the gRPC server of the device plugin

                func (*EniDevicePlugin) Stop

                func (m *EniDevicePlugin) Stop() error

                  Stop stops the gRPC server