Documentation ¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterResourceAllocateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterResourceAllocateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterResourceAllocateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterResourceAllocateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, ...) error
- func RegisterResourceAllocateServiceServer(s *grpc.Server, srv ResourceAllocateServiceServer)
- type AddTaskRequest
- type AddTaskResponse
- type DeleteTaskRequest
- type DeleteTaskResponse
- type GetTaskRequest
- type GetTaskResponse
- type GetWorkerRequest
- type GetWorkerResponse
- type ListTasksRequest
- func (*ListTasksRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTasksRequest) GetLimit() int32
- func (x *ListTasksRequest) GetOffset() int32
- func (x *ListTasksRequest) GetTotal() int32
- func (x *ListTasksRequest) GetWorkerId() string
- func (*ListTasksRequest) ProtoMessage()
- func (x *ListTasksRequest) ProtoReflect() protoreflect.Message
- func (x *ListTasksRequest) Reset()
- func (x *ListTasksRequest) String() string
- type ListTasksResponse
- type ListWorkersRequest
- func (*ListWorkersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListWorkersRequest) GetLimit() int32
- func (x *ListWorkersRequest) GetOffset() int32
- func (x *ListWorkersRequest) GetTotal() int32
- func (*ListWorkersRequest) ProtoMessage()
- func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message
- func (x *ListWorkersRequest) Reset()
- func (x *ListWorkersRequest) String() string
- type ListWorkersResponse
- func (*ListWorkersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListWorkersResponse) GetWorkers() []*Worker
- func (*ListWorkersResponse) ProtoMessage()
- func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message
- func (x *ListWorkersResponse) Reset()
- func (x *ListWorkersResponse) String() string
- type ResourceAllocateServiceClient
- type ResourceAllocateServiceServer
- type Task
- func (*Task) Descriptor() ([]byte, []int)deprecated
- func (x *Task) GetAssignedWorker() string
- func (x *Task) GetCreationTime() int64
- func (x *Task) GetLabels() map[string]string
- func (x *Task) GetPayload() []byte
- func (x *Task) GetRequests() map[string]uint64
- func (x *Task) GetStatus() *TaskStatus
- func (x *Task) GetUuid() string
- func (x *Task) GetVersion() int32
- func (*Task) ProtoMessage()
- func (x *Task) ProtoReflect() protoreflect.Message
- func (x *Task) Reset()
- func (x *Task) String() string
- type TaskStatus
- type UnimplementedResourceAllocateServiceServer
- func (*UnimplementedResourceAllocateServiceServer) AddTask(context.Context, *AddTaskRequest) (*AddTaskResponse, error)
- func (*UnimplementedResourceAllocateServiceServer) DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error)
- func (*UnimplementedResourceAllocateServiceServer) GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error)
- func (*UnimplementedResourceAllocateServiceServer) GetWorker(context.Context, *GetWorkerRequest) (*GetWorkerResponse, error)
- func (*UnimplementedResourceAllocateServiceServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
- func (*UnimplementedResourceAllocateServiceServer) ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error)
- type Worker
- func (*Worker) Descriptor() ([]byte, []int)deprecated
- func (x *Worker) GetClusterId() string
- func (x *Worker) GetId() string
- func (x *Worker) GetLabels() map[string]string
- func (x *Worker) GetPayload() []byte
- func (x *Worker) GetStatus() *WorkerStatus
- func (x *Worker) GetTotalQuotas() map[string]uint64
- func (x *Worker) GetVersion() int32
- func (*Worker) ProtoMessage()
- func (x *Worker) ProtoReflect() protoreflect.Message
- func (x *Worker) Reset()
- func (x *Worker) String() string
- type WorkerState
- func (WorkerState) Descriptor() protoreflect.EnumDescriptor
- func (x WorkerState) Enum() *WorkerState
- func (WorkerState) EnumDescriptor() ([]byte, []int)deprecated
- func (x WorkerState) Number() protoreflect.EnumNumber
- func (x WorkerState) String() string
- func (WorkerState) Type() protoreflect.EnumType
- type WorkerStatus
- func (*WorkerStatus) Descriptor() ([]byte, []int)deprecated
- func (x *WorkerStatus) GetState() WorkerState
- func (x *WorkerStatus) GetUsedQuotas() map[string]uint64
- func (*WorkerStatus) ProtoMessage()
- func (x *WorkerStatus) ProtoReflect() protoreflect.Message
- func (x *WorkerStatus) Reset()
- func (x *WorkerStatus) String() string
Constants ¶
This section is empty.
Variables ¶
var ( WorkerState_name = map[int32]string{ 0: "Offline", 1: "Online", } WorkerState_value = map[string]int32{ "Offline": 0, "Online": 1, } )
Enum value maps for WorkerState.
var File_github_com_amazingchow_engine_resource_allocate_service_pb_engine_resource_allocate_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterResourceAllocateServiceHandler ¶
func RegisterResourceAllocateServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterResourceAllocateServiceHandler registers the http handlers for service ResourceAllocateService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterResourceAllocateServiceHandlerClient ¶
func RegisterResourceAllocateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceAllocateServiceClient) error
RegisterResourceAllocateServiceHandlerClient registers the http handlers for service ResourceAllocateService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ResourceAllocateServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ResourceAllocateServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ResourceAllocateServiceClient" to call the correct interceptors.
func RegisterResourceAllocateServiceHandlerFromEndpoint ¶
func RegisterResourceAllocateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterResourceAllocateServiceHandlerFromEndpoint is same as RegisterResourceAllocateServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterResourceAllocateServiceHandlerServer ¶
func RegisterResourceAllocateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResourceAllocateServiceServer) error
RegisterResourceAllocateServiceHandlerServer registers the http handlers for service ResourceAllocateService to "mux". UnaryRPC :call ResourceAllocateServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterResourceAllocateServiceServer ¶
func RegisterResourceAllocateServiceServer(s *grpc.Server, srv ResourceAllocateServiceServer)
Types ¶
type AddTaskRequest ¶
type AddTaskRequest struct { Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` // contains filtered or unexported fields }
---------- request + response ----------
func (*AddTaskRequest) Descriptor
deprecated
func (*AddTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddTaskRequest.ProtoReflect.Descriptor instead.
func (*AddTaskRequest) GetTask ¶
func (x *AddTaskRequest) GetTask() *Task
func (*AddTaskRequest) ProtoMessage ¶
func (*AddTaskRequest) ProtoMessage()
func (*AddTaskRequest) ProtoReflect ¶
func (x *AddTaskRequest) ProtoReflect() protoreflect.Message
func (*AddTaskRequest) Reset ¶
func (x *AddTaskRequest) Reset()
func (*AddTaskRequest) String ¶
func (x *AddTaskRequest) String() string
type AddTaskResponse ¶
type AddTaskResponse struct { WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` // contains filtered or unexported fields }
func (*AddTaskResponse) Descriptor
deprecated
func (*AddTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddTaskResponse.ProtoReflect.Descriptor instead.
func (*AddTaskResponse) GetWorkerId ¶
func (x *AddTaskResponse) GetWorkerId() string
func (*AddTaskResponse) ProtoMessage ¶
func (*AddTaskResponse) ProtoMessage()
func (*AddTaskResponse) ProtoReflect ¶
func (x *AddTaskResponse) ProtoReflect() protoreflect.Message
func (*AddTaskResponse) Reset ¶
func (x *AddTaskResponse) Reset()
func (*AddTaskResponse) String ¶
func (x *AddTaskResponse) String() string
type DeleteTaskRequest ¶
type DeleteTaskRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*DeleteTaskRequest) Descriptor
deprecated
func (*DeleteTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTaskRequest.ProtoReflect.Descriptor instead.
func (*DeleteTaskRequest) GetUuid ¶
func (x *DeleteTaskRequest) GetUuid() string
func (*DeleteTaskRequest) ProtoMessage ¶
func (*DeleteTaskRequest) ProtoMessage()
func (*DeleteTaskRequest) ProtoReflect ¶
func (x *DeleteTaskRequest) ProtoReflect() protoreflect.Message
func (*DeleteTaskRequest) Reset ¶
func (x *DeleteTaskRequest) Reset()
func (*DeleteTaskRequest) String ¶
func (x *DeleteTaskRequest) String() string
type DeleteTaskResponse ¶
type DeleteTaskResponse struct {
// contains filtered or unexported fields
}
func (*DeleteTaskResponse) Descriptor
deprecated
func (*DeleteTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteTaskResponse.ProtoReflect.Descriptor instead.
func (*DeleteTaskResponse) ProtoMessage ¶
func (*DeleteTaskResponse) ProtoMessage()
func (*DeleteTaskResponse) ProtoReflect ¶
func (x *DeleteTaskResponse) ProtoReflect() protoreflect.Message
func (*DeleteTaskResponse) Reset ¶
func (x *DeleteTaskResponse) Reset()
func (*DeleteTaskResponse) String ¶
func (x *DeleteTaskResponse) String() string
type GetTaskRequest ¶
type GetTaskRequest struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // contains filtered or unexported fields }
func (*GetTaskRequest) Descriptor
deprecated
func (*GetTaskRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTaskRequest.ProtoReflect.Descriptor instead.
func (*GetTaskRequest) GetUuid ¶
func (x *GetTaskRequest) GetUuid() string
func (*GetTaskRequest) ProtoMessage ¶
func (*GetTaskRequest) ProtoMessage()
func (*GetTaskRequest) ProtoReflect ¶
func (x *GetTaskRequest) ProtoReflect() protoreflect.Message
func (*GetTaskRequest) Reset ¶
func (x *GetTaskRequest) Reset()
func (*GetTaskRequest) String ¶
func (x *GetTaskRequest) String() string
type GetTaskResponse ¶
type GetTaskResponse struct { Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` // contains filtered or unexported fields }
func (*GetTaskResponse) Descriptor
deprecated
func (*GetTaskResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTaskResponse.ProtoReflect.Descriptor instead.
func (*GetTaskResponse) GetTask ¶
func (x *GetTaskResponse) GetTask() *Task
func (*GetTaskResponse) ProtoMessage ¶
func (*GetTaskResponse) ProtoMessage()
func (*GetTaskResponse) ProtoReflect ¶
func (x *GetTaskResponse) ProtoReflect() protoreflect.Message
func (*GetTaskResponse) Reset ¶
func (x *GetTaskResponse) Reset()
func (*GetTaskResponse) String ¶
func (x *GetTaskResponse) String() string
type GetWorkerRequest ¶
type GetWorkerRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetWorkerRequest) Descriptor
deprecated
func (*GetWorkerRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetWorkerRequest.ProtoReflect.Descriptor instead.
func (*GetWorkerRequest) GetId ¶
func (x *GetWorkerRequest) GetId() string
func (*GetWorkerRequest) ProtoMessage ¶
func (*GetWorkerRequest) ProtoMessage()
func (*GetWorkerRequest) ProtoReflect ¶
func (x *GetWorkerRequest) ProtoReflect() protoreflect.Message
func (*GetWorkerRequest) Reset ¶
func (x *GetWorkerRequest) Reset()
func (*GetWorkerRequest) String ¶
func (x *GetWorkerRequest) String() string
type GetWorkerResponse ¶
type GetWorkerResponse struct { Worker *Worker `protobuf:"bytes,1,opt,name=worker,proto3" json:"worker,omitempty"` // contains filtered or unexported fields }
func (*GetWorkerResponse) Descriptor
deprecated
func (*GetWorkerResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetWorkerResponse.ProtoReflect.Descriptor instead.
func (*GetWorkerResponse) GetWorker ¶
func (x *GetWorkerResponse) GetWorker() *Worker
func (*GetWorkerResponse) ProtoMessage ¶
func (*GetWorkerResponse) ProtoMessage()
func (*GetWorkerResponse) ProtoReflect ¶
func (x *GetWorkerResponse) ProtoReflect() protoreflect.Message
func (*GetWorkerResponse) Reset ¶
func (x *GetWorkerResponse) Reset()
func (*GetWorkerResponse) String ¶
func (x *GetWorkerResponse) String() string
type ListTasksRequest ¶
type ListTasksRequest struct { WorkerId string `protobuf:"bytes,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` Limit int32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` Total int32 `protobuf:"varint,4,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListTasksRequest) Descriptor
deprecated
func (*ListTasksRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTasksRequest.ProtoReflect.Descriptor instead.
func (*ListTasksRequest) GetLimit ¶
func (x *ListTasksRequest) GetLimit() int32
func (*ListTasksRequest) GetOffset ¶
func (x *ListTasksRequest) GetOffset() int32
func (*ListTasksRequest) GetTotal ¶
func (x *ListTasksRequest) GetTotal() int32
func (*ListTasksRequest) GetWorkerId ¶
func (x *ListTasksRequest) GetWorkerId() string
func (*ListTasksRequest) ProtoMessage ¶
func (*ListTasksRequest) ProtoMessage()
func (*ListTasksRequest) ProtoReflect ¶
func (x *ListTasksRequest) ProtoReflect() protoreflect.Message
func (*ListTasksRequest) Reset ¶
func (x *ListTasksRequest) Reset()
func (*ListTasksRequest) String ¶
func (x *ListTasksRequest) String() string
type ListTasksResponse ¶
type ListTasksResponse struct { Tasks []*Task `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` // contains filtered or unexported fields }
func (*ListTasksResponse) Descriptor
deprecated
func (*ListTasksResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTasksResponse.ProtoReflect.Descriptor instead.
func (*ListTasksResponse) GetTasks ¶
func (x *ListTasksResponse) GetTasks() []*Task
func (*ListTasksResponse) ProtoMessage ¶
func (*ListTasksResponse) ProtoMessage()
func (*ListTasksResponse) ProtoReflect ¶
func (x *ListTasksResponse) ProtoReflect() protoreflect.Message
func (*ListTasksResponse) Reset ¶
func (x *ListTasksResponse) Reset()
func (*ListTasksResponse) String ¶
func (x *ListTasksResponse) String() string
type ListWorkersRequest ¶
type ListWorkersRequest struct { Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` Total int32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*ListWorkersRequest) Descriptor
deprecated
func (*ListWorkersRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListWorkersRequest.ProtoReflect.Descriptor instead.
func (*ListWorkersRequest) GetLimit ¶
func (x *ListWorkersRequest) GetLimit() int32
func (*ListWorkersRequest) GetOffset ¶
func (x *ListWorkersRequest) GetOffset() int32
func (*ListWorkersRequest) GetTotal ¶
func (x *ListWorkersRequest) GetTotal() int32
func (*ListWorkersRequest) ProtoMessage ¶
func (*ListWorkersRequest) ProtoMessage()
func (*ListWorkersRequest) ProtoReflect ¶
func (x *ListWorkersRequest) ProtoReflect() protoreflect.Message
func (*ListWorkersRequest) Reset ¶
func (x *ListWorkersRequest) Reset()
func (*ListWorkersRequest) String ¶
func (x *ListWorkersRequest) String() string
type ListWorkersResponse ¶
type ListWorkersResponse struct { Workers []*Worker `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` // contains filtered or unexported fields }
func (*ListWorkersResponse) Descriptor
deprecated
func (*ListWorkersResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListWorkersResponse.ProtoReflect.Descriptor instead.
func (*ListWorkersResponse) GetWorkers ¶
func (x *ListWorkersResponse) GetWorkers() []*Worker
func (*ListWorkersResponse) ProtoMessage ¶
func (*ListWorkersResponse) ProtoMessage()
func (*ListWorkersResponse) ProtoReflect ¶
func (x *ListWorkersResponse) ProtoReflect() protoreflect.Message
func (*ListWorkersResponse) Reset ¶
func (x *ListWorkersResponse) Reset()
func (*ListWorkersResponse) String ¶
func (x *ListWorkersResponse) String() string
type ResourceAllocateServiceClient ¶
type ResourceAllocateServiceClient interface { AddTask(ctx context.Context, in *AddTaskRequest, opts ...grpc.CallOption) (*AddTaskResponse, error) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*GetTaskResponse, error) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteTaskResponse, error) GetWorker(ctx context.Context, in *GetWorkerRequest, opts ...grpc.CallOption) (*GetWorkerResponse, error) ListWorkers(ctx context.Context, in *ListWorkersRequest, opts ...grpc.CallOption) (*ListWorkersResponse, error) }
ResourceAllocateServiceClient is the client API for ResourceAllocateService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewResourceAllocateServiceClient ¶
func NewResourceAllocateServiceClient(cc grpc.ClientConnInterface) ResourceAllocateServiceClient
type ResourceAllocateServiceServer ¶
type ResourceAllocateServiceServer interface { AddTask(context.Context, *AddTaskRequest) (*AddTaskResponse, error) GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error) GetWorker(context.Context, *GetWorkerRequest) (*GetWorkerResponse, error) ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error) }
ResourceAllocateServiceServer is the server API for ResourceAllocateService service.
type Task ¶
type Task struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // node resource should satisfy the requests Requests map[string]uint64 `` /* 158-byte string literal not displayed */ // node labels should match the labels Labels map[string]string `` /* 153-byte string literal not displayed */ AssignedWorker string `protobuf:"bytes,4,opt,name=assigned_worker,json=assignedWorker,proto3" json:"assigned_worker,omitempty"` Status *TaskStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` CreationTime int64 `protobuf:"varint,6,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` Version int32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` // task extra info Payload []byte `protobuf:"bytes,8,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetAssignedWorker ¶
func (*Task) GetCreationTime ¶
func (*Task) GetPayload ¶
func (*Task) GetRequests ¶
func (*Task) GetStatus ¶
func (x *Task) GetStatus() *TaskStatus
func (*Task) GetVersion ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type TaskStatus ¶
type TaskStatus struct { Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // task extra info Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*TaskStatus) Descriptor
deprecated
func (*TaskStatus) Descriptor() ([]byte, []int)
Deprecated: Use TaskStatus.ProtoReflect.Descriptor instead.
func (*TaskStatus) GetPayload ¶
func (x *TaskStatus) GetPayload() []byte
func (*TaskStatus) GetVersion ¶
func (x *TaskStatus) GetVersion() int32
func (*TaskStatus) ProtoMessage ¶
func (*TaskStatus) ProtoMessage()
func (*TaskStatus) ProtoReflect ¶
func (x *TaskStatus) ProtoReflect() protoreflect.Message
func (*TaskStatus) Reset ¶
func (x *TaskStatus) Reset()
func (*TaskStatus) String ¶
func (x *TaskStatus) String() string
type UnimplementedResourceAllocateServiceServer ¶
type UnimplementedResourceAllocateServiceServer struct { }
UnimplementedResourceAllocateServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedResourceAllocateServiceServer) AddTask ¶
func (*UnimplementedResourceAllocateServiceServer) AddTask(context.Context, *AddTaskRequest) (*AddTaskResponse, error)
func (*UnimplementedResourceAllocateServiceServer) DeleteTask ¶
func (*UnimplementedResourceAllocateServiceServer) DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error)
func (*UnimplementedResourceAllocateServiceServer) GetTask ¶
func (*UnimplementedResourceAllocateServiceServer) GetTask(context.Context, *GetTaskRequest) (*GetTaskResponse, error)
func (*UnimplementedResourceAllocateServiceServer) GetWorker ¶
func (*UnimplementedResourceAllocateServiceServer) GetWorker(context.Context, *GetWorkerRequest) (*GetWorkerResponse, error)
func (*UnimplementedResourceAllocateServiceServer) ListTasks ¶
func (*UnimplementedResourceAllocateServiceServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
func (*UnimplementedResourceAllocateServiceServer) ListWorkers ¶
func (*UnimplementedResourceAllocateServiceServer) ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error)
type Worker ¶
type Worker struct { ClusterId string `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // node resource quotas TotalQuotas map[string]uint64 `` /* 183-byte string literal not displayed */ // node labels Labels map[string]string `` /* 153-byte string literal not displayed */ Status *WorkerStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` Version int32 `protobuf:"varint,6,opt,name=version,proto3" json:"version,omitempty"` // node extra info Payload []byte `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*Worker) Descriptor
deprecated
func (*Worker) GetClusterId ¶
func (*Worker) GetPayload ¶
func (*Worker) GetStatus ¶
func (x *Worker) GetStatus() *WorkerStatus
func (*Worker) GetTotalQuotas ¶
func (*Worker) GetVersion ¶
func (*Worker) ProtoMessage ¶
func (*Worker) ProtoMessage()
func (*Worker) ProtoReflect ¶
func (x *Worker) ProtoReflect() protoreflect.Message
type WorkerState ¶
type WorkerState int32
const ( WorkerState_Offline WorkerState = 0 WorkerState_Online WorkerState = 1 )
func (WorkerState) Descriptor ¶
func (WorkerState) Descriptor() protoreflect.EnumDescriptor
func (WorkerState) Enum ¶
func (x WorkerState) Enum() *WorkerState
func (WorkerState) EnumDescriptor
deprecated
func (WorkerState) EnumDescriptor() ([]byte, []int)
Deprecated: Use WorkerState.Descriptor instead.
func (WorkerState) Number ¶
func (x WorkerState) Number() protoreflect.EnumNumber
func (WorkerState) String ¶
func (x WorkerState) String() string
func (WorkerState) Type ¶
func (WorkerState) Type() protoreflect.EnumType
type WorkerStatus ¶
type WorkerStatus struct { UsedQuotas map[string]uint64 `` /* 180-byte string literal not displayed */ State WorkerState `` /* 126-byte string literal not displayed */ // contains filtered or unexported fields }
func (*WorkerStatus) Descriptor
deprecated
func (*WorkerStatus) Descriptor() ([]byte, []int)
Deprecated: Use WorkerStatus.ProtoReflect.Descriptor instead.
func (*WorkerStatus) GetState ¶
func (x *WorkerStatus) GetState() WorkerState
func (*WorkerStatus) GetUsedQuotas ¶
func (x *WorkerStatus) GetUsedQuotas() map[string]uint64
func (*WorkerStatus) ProtoMessage ¶
func (*WorkerStatus) ProtoMessage()
func (*WorkerStatus) ProtoReflect ¶
func (x *WorkerStatus) ProtoReflect() protoreflect.Message
func (*WorkerStatus) Reset ¶
func (x *WorkerStatus) Reset()
func (*WorkerStatus) String ¶
func (x *WorkerStatus) String() string