Documentation ¶
Overview ¶
Package display is a generated protocol buffer package.
It is generated from these files:
pkg/api/runtime/display/api.proto
It has these top-level messages:
GraphResponse UsageResponse ContainerStat Devices DeviceInfo VersionResponse Spec
Package display is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterGPUDisplayHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGPUDisplayHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGPUDisplayServer(s *grpc.Server, srv GPUDisplayServer)
- type ContainerStat
- func (*ContainerStat) Descriptor() ([]byte, []int)
- func (m *ContainerStat) GetCluster() string
- func (m *ContainerStat) GetProject() string
- func (m *ContainerStat) GetSpec() map[string]*Spec
- func (m *ContainerStat) GetStat() map[string]*Devices
- func (m *ContainerStat) GetUser() string
- func (*ContainerStat) ProtoMessage()
- func (m *ContainerStat) Reset()
- func (m *ContainerStat) String() string
- type DeviceInfo
- func (*DeviceInfo) Descriptor() ([]byte, []int)
- func (m *DeviceInfo) GetCardIdx() string
- func (m *DeviceInfo) GetDeviceMem() float32
- func (m *DeviceInfo) GetGpu() float32
- func (m *DeviceInfo) GetId() string
- func (m *DeviceInfo) GetMem() float32
- func (m *DeviceInfo) GetPids() []int32
- func (*DeviceInfo) ProtoMessage()
- func (m *DeviceInfo) Reset()
- func (m *DeviceInfo) String() string
- type Devices
- type GPUDisplayClient
- type GPUDisplayServer
- type GraphResponse
- type Spec
- type UsageResponse
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGPUDisplayHandler ¶
func RegisterGPUDisplayHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGPUDisplayHandler registers the http handlers for service GPUDisplay to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGPUDisplayHandlerFromEndpoint ¶
func RegisterGPUDisplayHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGPUDisplayHandlerFromEndpoint is same as RegisterGPUDisplayHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGPUDisplayServer ¶
func RegisterGPUDisplayServer(s *grpc.Server, srv GPUDisplayServer)
Types ¶
type ContainerStat ¶
type ContainerStat struct { Stat map[string]*Devices `` /* 128-byte string literal not displayed */ Project string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"` User string `protobuf:"bytes,3,opt,name=user" json:"user,omitempty"` Cluster string `protobuf:"bytes,4,opt,name=cluster" json:"cluster,omitempty"` Spec map[string]*Spec `` /* 128-byte string literal not displayed */ }
func (*ContainerStat) Descriptor ¶
func (*ContainerStat) Descriptor() ([]byte, []int)
func (*ContainerStat) GetCluster ¶
func (m *ContainerStat) GetCluster() string
func (*ContainerStat) GetProject ¶
func (m *ContainerStat) GetProject() string
func (*ContainerStat) GetSpec ¶
func (m *ContainerStat) GetSpec() map[string]*Spec
func (*ContainerStat) GetStat ¶
func (m *ContainerStat) GetStat() map[string]*Devices
func (*ContainerStat) GetUser ¶
func (m *ContainerStat) GetUser() string
func (*ContainerStat) ProtoMessage ¶
func (*ContainerStat) ProtoMessage()
func (*ContainerStat) Reset ¶
func (m *ContainerStat) Reset()
func (*ContainerStat) String ¶
func (m *ContainerStat) String() string
type DeviceInfo ¶
type DeviceInfo struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` CardIdx string `protobuf:"bytes,2,opt,name=card_idx,json=cardIdx" json:"card_idx,omitempty"` Gpu float32 `protobuf:"fixed32,10,opt,name=gpu" json:"gpu,omitempty"` Mem float32 `protobuf:"fixed32,11,opt,name=mem" json:"mem,omitempty"` Pids []int32 `protobuf:"varint,12,rep,packed,name=pids" json:"pids,omitempty"` DeviceMem float32 `protobuf:"fixed32,13,opt,name=device_mem,json=deviceMem" json:"device_mem,omitempty"` }
func (*DeviceInfo) Descriptor ¶
func (*DeviceInfo) Descriptor() ([]byte, []int)
func (*DeviceInfo) GetCardIdx ¶
func (m *DeviceInfo) GetCardIdx() string
func (*DeviceInfo) GetDeviceMem ¶ added in v1.1.3
func (m *DeviceInfo) GetDeviceMem() float32
func (*DeviceInfo) GetGpu ¶
func (m *DeviceInfo) GetGpu() float32
func (*DeviceInfo) GetId ¶
func (m *DeviceInfo) GetId() string
func (*DeviceInfo) GetMem ¶
func (m *DeviceInfo) GetMem() float32
func (*DeviceInfo) GetPids ¶
func (m *DeviceInfo) GetPids() []int32
func (*DeviceInfo) ProtoMessage ¶
func (*DeviceInfo) ProtoMessage()
func (*DeviceInfo) Reset ¶
func (m *DeviceInfo) Reset()
func (*DeviceInfo) String ¶
func (m *DeviceInfo) String() string
type Devices ¶
type Devices struct {
Dev []*DeviceInfo `protobuf:"bytes,1,rep,name=dev" json:"dev,omitempty"`
}
func (*Devices) Descriptor ¶
func (*Devices) GetDev ¶
func (m *Devices) GetDev() []*DeviceInfo
func (*Devices) ProtoMessage ¶
func (*Devices) ProtoMessage()
type GPUDisplayClient ¶
type GPUDisplayClient interface { // PrintGraph returns the text graph of allocator state PrintGraph(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*GraphResponse, error) // GPU usages PrintUsages(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*UsageResponse, error) // Version Version(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*VersionResponse, error) }
func NewGPUDisplayClient ¶
func NewGPUDisplayClient(cc *grpc.ClientConn) GPUDisplayClient
type GPUDisplayServer ¶
type GPUDisplayServer interface { // PrintGraph returns the text graph of allocator state PrintGraph(context.Context, *google_protobuf1.Empty) (*GraphResponse, error) // GPU usages PrintUsages(context.Context, *google_protobuf1.Empty) (*UsageResponse, error) // Version Version(context.Context, *google_protobuf1.Empty) (*VersionResponse, error) }
type GraphResponse ¶
type GraphResponse struct {
Graph string `protobuf:"bytes,1,opt,name=graph" json:"graph,omitempty"`
}
func (*GraphResponse) Descriptor ¶
func (*GraphResponse) Descriptor() ([]byte, []int)
func (*GraphResponse) GetGraph ¶
func (m *GraphResponse) GetGraph() string
func (*GraphResponse) ProtoMessage ¶
func (*GraphResponse) ProtoMessage()
func (*GraphResponse) Reset ¶
func (m *GraphResponse) Reset()
func (*GraphResponse) String ¶
func (m *GraphResponse) String() string
type Spec ¶
type Spec struct { Gpu float32 `protobuf:"fixed32,1,opt,name=gpu" json:"gpu,omitempty"` Mem float32 `protobuf:"fixed32,2,opt,name=mem" json:"mem,omitempty"` }
func (*Spec) Descriptor ¶
func (*Spec) ProtoMessage ¶
func (*Spec) ProtoMessage()
type UsageResponse ¶
type UsageResponse struct {
Usage map[string]*ContainerStat `` /* 130-byte string literal not displayed */
}
func (*UsageResponse) Descriptor ¶
func (*UsageResponse) Descriptor() ([]byte, []int)
func (*UsageResponse) GetUsage ¶
func (m *UsageResponse) GetUsage() map[string]*ContainerStat
func (*UsageResponse) ProtoMessage ¶
func (*UsageResponse) ProtoMessage()
func (*UsageResponse) Reset ¶
func (m *UsageResponse) Reset()
func (*UsageResponse) String ¶
func (m *UsageResponse) String() string
type VersionResponse ¶
type VersionResponse struct {
Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}
func (*VersionResponse) Descriptor ¶
func (*VersionResponse) Descriptor() ([]byte, []int)
func (*VersionResponse) GetVersion ¶
func (m *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) Reset ¶
func (m *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (m *VersionResponse) String() string
Click to show internal directories.
Click to hide internal directories.