Documentation ¶
Overview ¶
Package scheduler is a generated protocol buffer package.
It is generated from these files:
scheduler.proto
It has these top-level messages:
Resources Node ListNodesRequest ListNodesResponse PutNodeResponse GetNodeRequest
Package scheduler is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSchedulerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSchedulerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSchedulerServiceServer(s *grpc.Server, srv SchedulerServiceServer)
- type GetNodeRequest
- type ListNodesRequest
- type ListNodesResponse
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetActivePorts() []int32
- func (m *Node) GetAvailable() *Resources
- func (m *Node) GetHostname() string
- func (m *Node) GetId() string
- func (m *Node) GetLastPing() int64
- func (m *Node) GetMetadata() map[string]string
- func (m *Node) GetPreemptible() bool
- func (m *Node) GetResources() *Resources
- func (m *Node) GetState() NodeState
- func (m *Node) GetTaskIds() []string
- func (m *Node) GetVersion() int64
- func (m *Node) GetZone() string
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- type NodeState
- type PutNodeResponse
- type Resources
- type SchedulerServiceClient
- type SchedulerServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var NodeState_name = map[int32]string{
0: "UNINITIALIZED",
1: "ALIVE",
2: "DEAD",
3: "GONE",
4: "INITIALIZING",
}
View Source
var NodeState_value = map[string]int32{
"UNINITIALIZED": 0,
"ALIVE": 1,
"DEAD": 2,
"GONE": 3,
"INITIALIZING": 4,
}
Functions ¶
func RegisterSchedulerServiceHandler ¶
func RegisterSchedulerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSchedulerServiceHandler registers the http handlers for service SchedulerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSchedulerServiceHandlerFromEndpoint ¶
func RegisterSchedulerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSchedulerServiceHandlerFromEndpoint is same as RegisterSchedulerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSchedulerServiceServer ¶
func RegisterSchedulerServiceServer(s *grpc.Server, srv SchedulerServiceServer)
Types ¶
type GetNodeRequest ¶
type GetNodeRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*GetNodeRequest) Descriptor ¶
func (*GetNodeRequest) Descriptor() ([]byte, []int)
func (*GetNodeRequest) GetId ¶
func (m *GetNodeRequest) GetId() string
func (*GetNodeRequest) ProtoMessage ¶
func (*GetNodeRequest) ProtoMessage()
func (*GetNodeRequest) Reset ¶
func (m *GetNodeRequest) Reset()
func (*GetNodeRequest) String ¶
func (m *GetNodeRequest) String() string
type ListNodesRequest ¶
type ListNodesRequest struct { }
func (*ListNodesRequest) Descriptor ¶
func (*ListNodesRequest) Descriptor() ([]byte, []int)
func (*ListNodesRequest) ProtoMessage ¶
func (*ListNodesRequest) ProtoMessage()
func (*ListNodesRequest) Reset ¶
func (m *ListNodesRequest) Reset()
func (*ListNodesRequest) String ¶
func (m *ListNodesRequest) String() string
type ListNodesResponse ¶
type ListNodesResponse struct {
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}
func (*ListNodesResponse) Descriptor ¶
func (*ListNodesResponse) Descriptor() ([]byte, []int)
func (*ListNodesResponse) GetNodes ¶
func (m *ListNodesResponse) GetNodes() []*Node
func (*ListNodesResponse) ProtoMessage ¶
func (*ListNodesResponse) ProtoMessage()
func (*ListNodesResponse) Reset ¶
func (m *ListNodesResponse) Reset()
func (*ListNodesResponse) String ¶
func (m *ListNodesResponse) String() string
type Node ¶
type Node struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Resources *Resources `protobuf:"bytes,5,opt,name=resources" json:"resources,omitempty"` Available *Resources `protobuf:"bytes,6,opt,name=available" json:"available,omitempty"` State NodeState `protobuf:"varint,8,opt,name=state,enum=scheduler.NodeState" json:"state,omitempty"` Preemptible bool `protobuf:"varint,9,opt,name=preemptible" json:"preemptible,omitempty"` ActivePorts []int32 `protobuf:"varint,10,rep,packed,name=active_ports,json=activePorts" json:"active_ports,omitempty"` Zone string `protobuf:"bytes,11,opt,name=zone" json:"zone,omitempty"` Hostname string `protobuf:"bytes,13,opt,name=hostname" json:"hostname,omitempty"` // Timestamp version of the record in the database. Used to prevent write conflicts and as the last ping time. Version int64 `protobuf:"varint,14,opt,name=version" json:"version,omitempty"` Metadata map[string]string `` /* 137-byte string literal not displayed */ TaskIds []string `protobuf:"bytes,16,rep,name=task_ids,json=taskIds" json:"task_ids,omitempty"` LastPing int64 `protobuf:"varint,17,opt,name=last_ping,json=lastPing" json:"last_ping,omitempty"` }
func (*Node) Descriptor ¶
func (*Node) GetActivePorts ¶
func (*Node) GetAvailable ¶
func (*Node) GetHostname ¶
func (*Node) GetLastPing ¶
func (*Node) GetMetadata ¶
func (*Node) GetPreemptible ¶
func (*Node) GetResources ¶
func (*Node) GetTaskIds ¶
func (*Node) GetVersion ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type PutNodeResponse ¶
type PutNodeResponse struct { }
func (*PutNodeResponse) Descriptor ¶
func (*PutNodeResponse) Descriptor() ([]byte, []int)
func (*PutNodeResponse) ProtoMessage ¶
func (*PutNodeResponse) ProtoMessage()
func (*PutNodeResponse) Reset ¶
func (m *PutNodeResponse) Reset()
func (*PutNodeResponse) String ¶
func (m *PutNodeResponse) String() string
type Resources ¶
type Resources struct { Cpus uint32 `protobuf:"varint,1,opt,name=cpus" json:"cpus,omitempty"` // In GB RamGb float64 `protobuf:"fixed64,2,opt,name=ram_gb,json=ramGb" json:"ram_gb,omitempty"` // In GB DiskGb float64 `protobuf:"fixed64,3,opt,name=disk_gb,json=diskGb" json:"disk_gb,omitempty"` }
func (*Resources) Descriptor ¶
func (*Resources) ProtoMessage ¶
func (*Resources) ProtoMessage()
type SchedulerServiceClient ¶
type SchedulerServiceClient interface { PutNode(ctx context.Context, in *Node, opts ...grpc.CallOption) (*PutNodeResponse, error) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) GetNode(ctx context.Context, in *GetNodeRequest, opts ...grpc.CallOption) (*Node, error) }
func NewSchedulerServiceClient ¶
func NewSchedulerServiceClient(cc *grpc.ClientConn) SchedulerServiceClient
type SchedulerServiceServer ¶
type SchedulerServiceServer interface { PutNode(context.Context, *Node) (*PutNodeResponse, error) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) GetNode(context.Context, *GetNodeRequest) (*Node, error) }
Click to show internal directories.
Click to hide internal directories.