scheduler

package
v0.0.0-...-5db00e0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 13 Imported by: 0

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

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) Descriptor() ([]byte, []int)

func (*Node) GetActivePorts

func (m *Node) GetActivePorts() []int32

func (*Node) GetAvailable

func (m *Node) GetAvailable() *Resources

func (*Node) GetHostname

func (m *Node) GetHostname() string

func (*Node) GetId

func (m *Node) GetId() string

func (*Node) GetLastPing

func (m *Node) GetLastPing() int64

func (*Node) GetMetadata

func (m *Node) GetMetadata() map[string]string

func (*Node) GetPreemptible

func (m *Node) GetPreemptible() bool

func (*Node) GetResources

func (m *Node) GetResources() *Resources

func (*Node) GetState

func (m *Node) GetState() NodeState

func (*Node) GetTaskIds

func (m *Node) GetTaskIds() []string

func (*Node) GetVersion

func (m *Node) GetVersion() int64

func (*Node) GetZone

func (m *Node) GetZone() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

type NodeState

type NodeState int32
const (
	NodeState_UNINITIALIZED NodeState = 0
	NodeState_ALIVE         NodeState = 1
	NodeState_DEAD          NodeState = 2
	NodeState_GONE          NodeState = 3
	NodeState_INITIALIZING  NodeState = 4
)

func (NodeState) EnumDescriptor

func (NodeState) EnumDescriptor() ([]byte, []int)

func (NodeState) String

func (x NodeState) String() string

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) Descriptor() ([]byte, []int)

func (*Resources) GetCpus

func (m *Resources) GetCpus() uint32

func (*Resources) GetDiskGb

func (m *Resources) GetDiskGb() float64

func (*Resources) GetRamGb

func (m *Resources) GetRamGb() float64

func (*Resources) ProtoMessage

func (*Resources) ProtoMessage()

func (*Resources) Reset

func (m *Resources) Reset()

func (*Resources) String

func (m *Resources) String() string

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)
}

Jump to

Keyboard shortcuts

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