deviceplugin

package
v0.0.0-...-c1e1b2a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAllocateResponse

func MakeAllocateResponse(rqt *pluginapi.AllocateRequest, devices map[string]DeviceInfo) (*pluginapi.AllocateResponse, error)

MakeAllocateResponse creates response data for Allocate GRPC call

Types

type DeviceInfo

type DeviceInfo struct {
	State string
	Nodes []string
}

DeviceInfo contains information about device maintained by Device Plugin

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server structure to keep server parameters

func (*Server) Serve

func (srv *Server) Serve(dm pluginapi.DevicePluginServer, resourceName string, pluginPrefix string) error

Serve serves starts gRPC server to serve Device Plugin functionality

func (*Server) Stop

func (srv *Server) Stop() error

Stop stops serving Device Plugin

Jump to

Keyboard shortcuts

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