Documentation ¶
Overview ¶
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMapReduceRPCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMapReduceRPCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MapReduceRPCServiceClient) error
- func RegisterMapReduceRPCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMapReduceRPCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MapReduceRPCServiceServer) error
- func RegisterMapReduceRPCServiceServer(s *grpc.Server, srv MapReduceRPCServiceServer)
- type AddTaskRequest
- func (*AddTaskRequest) Descriptor() ([]byte, []int)
- func (m *AddTaskRequest) GetTask() *Task
- func (*AddTaskRequest) ProtoMessage()
- func (m *AddTaskRequest) Reset()
- func (m *AddTaskRequest) String() string
- func (m *AddTaskRequest) XXX_DiscardUnknown()
- func (m *AddTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddTaskRequest) XXX_Merge(src proto.Message)
- func (m *AddTaskRequest) XXX_Size() int
- func (m *AddTaskRequest) XXX_Unmarshal(b []byte) error
- type AddTaskResponse
- func (*AddTaskResponse) Descriptor() ([]byte, []int)
- func (*AddTaskResponse) ProtoMessage()
- func (m *AddTaskResponse) Reset()
- func (m *AddTaskResponse) String() string
- func (m *AddTaskResponse) XXX_DiscardUnknown()
- func (m *AddTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AddTaskResponse) XXX_Merge(src proto.Message)
- func (m *AddTaskResponse) XXX_Size() int
- func (m *AddTaskResponse) XXX_Unmarshal(b []byte) error
- type IntercomRequest
- func (*IntercomRequest) Descriptor() ([]byte, []int)
- func (m *IntercomRequest) GetExtra() string
- func (m *IntercomRequest) GetMsgContent() string
- func (m *IntercomRequest) GetMsgType() IntercomType
- func (*IntercomRequest) ProtoMessage()
- func (m *IntercomRequest) Reset()
- func (m *IntercomRequest) String() string
- func (m *IntercomRequest) XXX_DiscardUnknown()
- func (m *IntercomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IntercomRequest) XXX_Merge(src proto.Message)
- func (m *IntercomRequest) XXX_Size() int
- func (m *IntercomRequest) XXX_Unmarshal(b []byte) error
- type IntercomResponse
- func (*IntercomResponse) Descriptor() ([]byte, []int)
- func (m *IntercomResponse) GetFile() string
- func (m *IntercomResponse) GetMapTaskAllocated() int32
- func (m *IntercomResponse) GetNReduce() int32
- func (m *IntercomResponse) GetReduceFiles() []string
- func (m *IntercomResponse) GetReduceTaskAllocated() int32
- func (m *IntercomResponse) GetTaskType() TaskType
- func (*IntercomResponse) ProtoMessage()
- func (m *IntercomResponse) Reset()
- func (m *IntercomResponse) String() string
- func (m *IntercomResponse) XXX_DiscardUnknown()
- func (m *IntercomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IntercomResponse) XXX_Merge(src proto.Message)
- func (m *IntercomResponse) XXX_Size() int
- func (m *IntercomResponse) XXX_Unmarshal(b []byte) error
- type IntercomType
- type ListWorkersRequest
- func (*ListWorkersRequest) Descriptor() ([]byte, []int)
- func (*ListWorkersRequest) ProtoMessage()
- func (m *ListWorkersRequest) Reset()
- func (m *ListWorkersRequest) String() string
- func (m *ListWorkersRequest) XXX_DiscardUnknown()
- func (m *ListWorkersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListWorkersRequest) XXX_Merge(src proto.Message)
- func (m *ListWorkersRequest) XXX_Size() int
- func (m *ListWorkersRequest) XXX_Unmarshal(b []byte) error
- type ListWorkersResponse
- func (*ListWorkersResponse) Descriptor() ([]byte, []int)
- func (m *ListWorkersResponse) GetWorkers() []*Worker
- func (*ListWorkersResponse) ProtoMessage()
- func (m *ListWorkersResponse) Reset()
- func (m *ListWorkersResponse) String() string
- func (m *ListWorkersResponse) XXX_DiscardUnknown()
- func (m *ListWorkersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListWorkersResponse) XXX_Merge(src proto.Message)
- func (m *ListWorkersResponse) XXX_Size() int
- func (m *ListWorkersResponse) XXX_Unmarshal(b []byte) error
- type MapReduceRPCServiceClient
- type MapReduceRPCServiceServer
- type Task
- func (*Task) Descriptor() ([]byte, []int)
- func (m *Task) GetInputs() []string
- func (*Task) ProtoMessage()
- func (m *Task) Reset()
- func (m *Task) String() string
- func (m *Task) XXX_DiscardUnknown()
- func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Task) XXX_Merge(src proto.Message)
- func (m *Task) XXX_Size() int
- func (m *Task) XXX_Unmarshal(b []byte) error
- type TaskStatus
- type TaskType
- type UnimplementedMapReduceRPCServiceServer
- func (*UnimplementedMapReduceRPCServiceServer) AddTask(ctx context.Context, req *AddTaskRequest) (*AddTaskResponse, error)
- func (*UnimplementedMapReduceRPCServiceServer) Intercom(ctx context.Context, req *IntercomRequest) (*IntercomResponse, error)
- func (*UnimplementedMapReduceRPCServiceServer) ListWorkers(ctx context.Context, req *ListWorkersRequest) (*ListWorkersResponse, error)
- type Worker
- func (*Worker) Descriptor() ([]byte, []int)
- func (m *Worker) GetId() string
- func (m *Worker) GetStatus() WorkerStatus
- func (*Worker) ProtoMessage()
- func (m *Worker) Reset()
- func (m *Worker) String() string
- func (m *Worker) XXX_DiscardUnknown()
- func (m *Worker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Worker) XXX_Merge(src proto.Message)
- func (m *Worker) XXX_Size() int
- func (m *Worker) XXX_Unmarshal(b []byte) error
- type WorkerStatus
Constants ¶
This section is empty.
Variables ¶
var IntercomType_name = map[int32]string{
0: "INTERCOM_TYPE_ASK_TASK",
1: "INTERCOM_TYPE_FINISH_MAP_TASK",
2: "INTERCOM_TYPE_FINISH_REDUCE_TASK",
3: "INTERCOM_TYPE_SEND_INTER_FILE",
}
var IntercomType_value = map[string]int32{
"INTERCOM_TYPE_ASK_TASK": 0,
"INTERCOM_TYPE_FINISH_MAP_TASK": 1,
"INTERCOM_TYPE_FINISH_REDUCE_TASK": 2,
"INTERCOM_TYPE_SEND_INTER_FILE": 3,
}
var TaskStatus_name = map[int32]string{
0: "TASK_STATUS_UNALLOTED",
1: "TASK_STATUS_ALLOTED",
2: "TASK_STATUS_DONE",
}
var TaskStatus_value = map[string]int32{
"TASK_STATUS_UNALLOTED": 0,
"TASK_STATUS_ALLOTED": 1,
"TASK_STATUS_DONE": 2,
}
var TaskType_name = map[int32]string{
0: "TASK_TYPE_MAP",
1: "TASK_TYPE_REDUCE",
}
var TaskType_value = map[string]int32{
"TASK_TYPE_MAP": 0,
"TASK_TYPE_REDUCE": 1,
}
var WorkerStatus_name = map[int32]string{
0: "WORKER_STATUS_ALIVE",
1: "WORKER_STATUS_UNHEALTHY",
}
var WorkerStatus_value = map[string]int32{
"WORKER_STATUS_ALIVE": 0,
"WORKER_STATUS_UNHEALTHY": 1,
}
Functions ¶
func RegisterMapReduceRPCServiceHandler ¶
func RegisterMapReduceRPCServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMapReduceRPCServiceHandler registers the http handlers for service MapReduceRPCService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMapReduceRPCServiceHandlerClient ¶
func RegisterMapReduceRPCServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MapReduceRPCServiceClient) error
RegisterMapReduceRPCServiceHandlerClient registers the http handlers for service MapReduceRPCService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MapReduceRPCServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MapReduceRPCServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MapReduceRPCServiceClient" to call the correct interceptors.
func RegisterMapReduceRPCServiceHandlerFromEndpoint ¶
func RegisterMapReduceRPCServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMapReduceRPCServiceHandlerFromEndpoint is same as RegisterMapReduceRPCServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMapReduceRPCServiceHandlerServer ¶
func RegisterMapReduceRPCServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MapReduceRPCServiceServer) error
RegisterMapReduceRPCServiceHandlerServer registers the http handlers for service MapReduceRPCService to "mux". UnaryRPC :call MapReduceRPCServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterMapReduceRPCServiceServer ¶
func RegisterMapReduceRPCServiceServer(s *grpc.Server, srv MapReduceRPCServiceServer)
Types ¶
type AddTaskRequest ¶
type AddTaskRequest struct { Task *Task `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
---------- request + response ----------
func (*AddTaskRequest) Descriptor ¶
func (*AddTaskRequest) Descriptor() ([]byte, []int)
func (*AddTaskRequest) GetTask ¶
func (m *AddTaskRequest) GetTask() *Task
func (*AddTaskRequest) ProtoMessage ¶
func (*AddTaskRequest) ProtoMessage()
func (*AddTaskRequest) Reset ¶
func (m *AddTaskRequest) Reset()
func (*AddTaskRequest) String ¶
func (m *AddTaskRequest) String() string
func (*AddTaskRequest) XXX_DiscardUnknown ¶
func (m *AddTaskRequest) XXX_DiscardUnknown()
func (*AddTaskRequest) XXX_Marshal ¶
func (m *AddTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddTaskRequest) XXX_Merge ¶
func (m *AddTaskRequest) XXX_Merge(src proto.Message)
func (*AddTaskRequest) XXX_Size ¶
func (m *AddTaskRequest) XXX_Size() int
func (*AddTaskRequest) XXX_Unmarshal ¶
func (m *AddTaskRequest) XXX_Unmarshal(b []byte) error
type AddTaskResponse ¶
type AddTaskResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*AddTaskResponse) Descriptor ¶
func (*AddTaskResponse) Descriptor() ([]byte, []int)
func (*AddTaskResponse) ProtoMessage ¶
func (*AddTaskResponse) ProtoMessage()
func (*AddTaskResponse) Reset ¶
func (m *AddTaskResponse) Reset()
func (*AddTaskResponse) String ¶
func (m *AddTaskResponse) String() string
func (*AddTaskResponse) XXX_DiscardUnknown ¶
func (m *AddTaskResponse) XXX_DiscardUnknown()
func (*AddTaskResponse) XXX_Marshal ¶
func (m *AddTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AddTaskResponse) XXX_Merge ¶
func (m *AddTaskResponse) XXX_Merge(src proto.Message)
func (*AddTaskResponse) XXX_Size ¶
func (m *AddTaskResponse) XXX_Size() int
func (*AddTaskResponse) XXX_Unmarshal ¶
func (m *AddTaskResponse) XXX_Unmarshal(b []byte) error
type IntercomRequest ¶
type IntercomRequest struct { MsgType IntercomType `protobuf:"varint,1,opt,name=MsgType,proto3,enum=amazingchow.mapreduce.IntercomType" json:"MsgType,omitempty"` MsgContent string `protobuf:"bytes,2,opt,name=MsgContent,proto3" json:"MsgContent,omitempty"` Extra string `protobuf:"bytes,3,opt,name=Extra,proto3" json:"Extra,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IntercomRequest) Descriptor ¶
func (*IntercomRequest) Descriptor() ([]byte, []int)
func (*IntercomRequest) GetExtra ¶
func (m *IntercomRequest) GetExtra() string
func (*IntercomRequest) GetMsgContent ¶
func (m *IntercomRequest) GetMsgContent() string
func (*IntercomRequest) GetMsgType ¶
func (m *IntercomRequest) GetMsgType() IntercomType
func (*IntercomRequest) ProtoMessage ¶
func (*IntercomRequest) ProtoMessage()
func (*IntercomRequest) Reset ¶
func (m *IntercomRequest) Reset()
func (*IntercomRequest) String ¶
func (m *IntercomRequest) String() string
func (*IntercomRequest) XXX_DiscardUnknown ¶
func (m *IntercomRequest) XXX_DiscardUnknown()
func (*IntercomRequest) XXX_Marshal ¶
func (m *IntercomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IntercomRequest) XXX_Merge ¶
func (m *IntercomRequest) XXX_Merge(src proto.Message)
func (*IntercomRequest) XXX_Size ¶
func (m *IntercomRequest) XXX_Size() int
func (*IntercomRequest) XXX_Unmarshal ¶
func (m *IntercomRequest) XXX_Unmarshal(b []byte) error
type IntercomResponse ¶
type IntercomResponse struct { TaskType TaskType `protobuf:"varint,1,opt,name=TaskType,proto3,enum=amazingchow.mapreduce.TaskType" json:"TaskType,omitempty"` File string `protobuf:"bytes,2,opt,name=File,proto3" json:"File,omitempty"` NReduce int32 `protobuf:"varint,3,opt,name=NReduce,proto3" json:"NReduce,omitempty"` MapTaskAllocated int32 `protobuf:"varint,4,opt,name=MapTaskAllocated,proto3" json:"MapTaskAllocated,omitempty"` ReduceTaskAllocated int32 `protobuf:"varint,5,opt,name=ReduceTaskAllocated,proto3" json:"ReduceTaskAllocated,omitempty"` ReduceFiles []string `protobuf:"bytes,6,rep,name=ReduceFiles,proto3" json:"ReduceFiles,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IntercomResponse) Descriptor ¶
func (*IntercomResponse) Descriptor() ([]byte, []int)
func (*IntercomResponse) GetFile ¶
func (m *IntercomResponse) GetFile() string
func (*IntercomResponse) GetMapTaskAllocated ¶
func (m *IntercomResponse) GetMapTaskAllocated() int32
func (*IntercomResponse) GetNReduce ¶
func (m *IntercomResponse) GetNReduce() int32
func (*IntercomResponse) GetReduceFiles ¶
func (m *IntercomResponse) GetReduceFiles() []string
func (*IntercomResponse) GetReduceTaskAllocated ¶
func (m *IntercomResponse) GetReduceTaskAllocated() int32
func (*IntercomResponse) GetTaskType ¶
func (m *IntercomResponse) GetTaskType() TaskType
func (*IntercomResponse) ProtoMessage ¶
func (*IntercomResponse) ProtoMessage()
func (*IntercomResponse) Reset ¶
func (m *IntercomResponse) Reset()
func (*IntercomResponse) String ¶
func (m *IntercomResponse) String() string
func (*IntercomResponse) XXX_DiscardUnknown ¶
func (m *IntercomResponse) XXX_DiscardUnknown()
func (*IntercomResponse) XXX_Marshal ¶
func (m *IntercomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*IntercomResponse) XXX_Merge ¶
func (m *IntercomResponse) XXX_Merge(src proto.Message)
func (*IntercomResponse) XXX_Size ¶
func (m *IntercomResponse) XXX_Size() int
func (*IntercomResponse) XXX_Unmarshal ¶
func (m *IntercomResponse) XXX_Unmarshal(b []byte) error
type IntercomType ¶
type IntercomType int32
const ( IntercomType_INTERCOM_TYPE_ASK_TASK IntercomType = 0 IntercomType_INTERCOM_TYPE_FINISH_MAP_TASK IntercomType = 1 IntercomType_INTERCOM_TYPE_FINISH_REDUCE_TASK IntercomType = 2 IntercomType_INTERCOM_TYPE_SEND_INTER_FILE IntercomType = 3 )
func (IntercomType) EnumDescriptor ¶
func (IntercomType) EnumDescriptor() ([]byte, []int)
func (IntercomType) String ¶
func (x IntercomType) String() string
type ListWorkersRequest ¶
type ListWorkersRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListWorkersRequest) Descriptor ¶
func (*ListWorkersRequest) Descriptor() ([]byte, []int)
func (*ListWorkersRequest) ProtoMessage ¶
func (*ListWorkersRequest) ProtoMessage()
func (*ListWorkersRequest) Reset ¶
func (m *ListWorkersRequest) Reset()
func (*ListWorkersRequest) String ¶
func (m *ListWorkersRequest) String() string
func (*ListWorkersRequest) XXX_DiscardUnknown ¶
func (m *ListWorkersRequest) XXX_DiscardUnknown()
func (*ListWorkersRequest) XXX_Marshal ¶
func (m *ListWorkersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListWorkersRequest) XXX_Merge ¶
func (m *ListWorkersRequest) XXX_Merge(src proto.Message)
func (*ListWorkersRequest) XXX_Size ¶
func (m *ListWorkersRequest) XXX_Size() int
func (*ListWorkersRequest) XXX_Unmarshal ¶
func (m *ListWorkersRequest) XXX_Unmarshal(b []byte) error
type ListWorkersResponse ¶
type ListWorkersResponse struct { Workers []*Worker `protobuf:"bytes,1,rep,name=workers,proto3" json:"workers,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ListWorkersResponse) Descriptor ¶
func (*ListWorkersResponse) Descriptor() ([]byte, []int)
func (*ListWorkersResponse) GetWorkers ¶
func (m *ListWorkersResponse) GetWorkers() []*Worker
func (*ListWorkersResponse) ProtoMessage ¶
func (*ListWorkersResponse) ProtoMessage()
func (*ListWorkersResponse) Reset ¶
func (m *ListWorkersResponse) Reset()
func (*ListWorkersResponse) String ¶
func (m *ListWorkersResponse) String() string
func (*ListWorkersResponse) XXX_DiscardUnknown ¶
func (m *ListWorkersResponse) XXX_DiscardUnknown()
func (*ListWorkersResponse) XXX_Marshal ¶
func (m *ListWorkersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListWorkersResponse) XXX_Merge ¶
func (m *ListWorkersResponse) XXX_Merge(src proto.Message)
func (*ListWorkersResponse) XXX_Size ¶
func (m *ListWorkersResponse) XXX_Size() int
func (*ListWorkersResponse) XXX_Unmarshal ¶
func (m *ListWorkersResponse) XXX_Unmarshal(b []byte) error
type MapReduceRPCServiceClient ¶
type MapReduceRPCServiceClient interface { AddTask(ctx context.Context, in *AddTaskRequest, opts ...grpc.CallOption) (*AddTaskResponse, error) ListWorkers(ctx context.Context, in *ListWorkersRequest, opts ...grpc.CallOption) (*ListWorkersResponse, error) Intercom(ctx context.Context, in *IntercomRequest, opts ...grpc.CallOption) (*IntercomResponse, error) }
MapReduceRPCServiceClient is the client API for MapReduceRPCService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMapReduceRPCServiceClient ¶
func NewMapReduceRPCServiceClient(cc *grpc.ClientConn) MapReduceRPCServiceClient
type MapReduceRPCServiceServer ¶
type MapReduceRPCServiceServer interface { AddTask(context.Context, *AddTaskRequest) (*AddTaskResponse, error) ListWorkers(context.Context, *ListWorkersRequest) (*ListWorkersResponse, error) Intercom(context.Context, *IntercomRequest) (*IntercomResponse, error) }
MapReduceRPCServiceServer is the server API for MapReduceRPCService service.
type Task ¶
type Task struct { Inputs []string `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Task) Descriptor ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) XXX_DiscardUnknown ¶
func (m *Task) XXX_DiscardUnknown()
func (*Task) XXX_Unmarshal ¶
type TaskStatus ¶
type TaskStatus int32
const ( TaskStatus_TASK_STATUS_UNALLOTED TaskStatus = 0 TaskStatus_TASK_STATUS_ALLOTED TaskStatus = 1 TaskStatus_TASK_STATUS_DONE TaskStatus = 2 )
func (TaskStatus) EnumDescriptor ¶
func (TaskStatus) EnumDescriptor() ([]byte, []int)
func (TaskStatus) String ¶
func (x TaskStatus) String() string
type UnimplementedMapReduceRPCServiceServer ¶
type UnimplementedMapReduceRPCServiceServer struct { }
UnimplementedMapReduceRPCServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMapReduceRPCServiceServer) AddTask ¶
func (*UnimplementedMapReduceRPCServiceServer) AddTask(ctx context.Context, req *AddTaskRequest) (*AddTaskResponse, error)
func (*UnimplementedMapReduceRPCServiceServer) Intercom ¶
func (*UnimplementedMapReduceRPCServiceServer) Intercom(ctx context.Context, req *IntercomRequest) (*IntercomResponse, error)
func (*UnimplementedMapReduceRPCServiceServer) ListWorkers ¶
func (*UnimplementedMapReduceRPCServiceServer) ListWorkers(ctx context.Context, req *ListWorkersRequest) (*ListWorkersResponse, error)
type Worker ¶
type Worker struct { Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Status WorkerStatus `protobuf:"varint,5,opt,name=status,proto3,enum=amazingchow.mapreduce.WorkerStatus" json:"status,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Worker) Descriptor ¶
func (*Worker) GetStatus ¶
func (m *Worker) GetStatus() WorkerStatus
func (*Worker) ProtoMessage ¶
func (*Worker) ProtoMessage()
func (*Worker) XXX_DiscardUnknown ¶
func (m *Worker) XXX_DiscardUnknown()
func (*Worker) XXX_Marshal ¶
func (*Worker) XXX_Unmarshal ¶
type WorkerStatus ¶
type WorkerStatus int32
const ( WorkerStatus_WORKER_STATUS_ALIVE WorkerStatus = 0 WorkerStatus_WORKER_STATUS_UNHEALTHY WorkerStatus = 1 )
func (WorkerStatus) EnumDescriptor ¶
func (WorkerStatus) EnumDescriptor() ([]byte, []int)
func (WorkerStatus) String ¶
func (x WorkerStatus) String() string