Documentation ¶
Index ¶
- Constants
- Variables
- func GetEniCapByInstanceType(instanceType string, ecsClient *ecs.Client, floatingRatio float64, shift int) (int, error)
- type EniDevicePlugin
- func (m *EniDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
- func (m *EniDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
- func (m *EniDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
- func (m *EniDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
- func (m *EniDevicePlugin) Register(request pluginapi.RegisterRequest) error
- func (m *EniDevicePlugin) Serve(resourceName string) error
- func (m *EniDevicePlugin) Start() error
- func (m *EniDevicePlugin) Stop() error
Constants ¶
View Source
const (
DefaultResourceName = "aliyun/eni"
)
Variables ¶
View Source
var DefaultEcsBackoff = wait.Backoff{ Steps: 5, Duration: 500 * time.Millisecond, Jitter: 1.0, }
Functions ¶
Types ¶
type EniDevicePlugin ¶
EniDevicePlugin implements the Kubernetes device plugin API
func NewEniDevicePlugin ¶
func NewEniDevicePlugin(count int) *EniDevicePlugin
NewEniDevicePlugin returns an initialized EniDevicePlugin
func (*EniDevicePlugin) Allocate ¶
func (m *EniDevicePlugin) Allocate(ctx context.Context, r *pluginapi.AllocateRequest) (*pluginapi.AllocateResponse, error)
Allocate which return list of devices.
func (*EniDevicePlugin) GetDevicePluginOptions ¶
func (m *EniDevicePlugin) GetDevicePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.DevicePluginOptions, error)
func (*EniDevicePlugin) ListAndWatch ¶
func (m *EniDevicePlugin) ListAndWatch(e *pluginapi.Empty, s pluginapi.DevicePlugin_ListAndWatchServer) error
ListAndWatch lists devices and update that list according to the health status
func (*EniDevicePlugin) PreStartContainer ¶
func (m *EniDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreStartContainerRequest) (*pluginapi.PreStartContainerResponse, error)
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
Click to show internal directories.
Click to hide internal directories.