Documentation ¶
Index ¶
- Variables
- func RegisterOrchestratorServer(s grpc.ServiceRegistrar, srv OrchestratorServer)
- type Empty
- type OrchestratorClient
- type OrchestratorServer
- type Orchestrator_ConnectClient
- type Orchestrator_ConnectServer
- type PongReq
- type RegisterReq
- type RegisterResp
- type ResultResp
- func (*ResultResp) Descriptor() ([]byte, []int)deprecated
- func (x *ResultResp) GetError() bool
- func (x *ResultResp) GetResult() float64
- func (x *ResultResp) GetRunningThreads() int64
- func (x *ResultResp) GetTaskId() int64
- func (*ResultResp) ProtoMessage()
- func (x *ResultResp) ProtoReflect() protoreflect.Message
- func (x *ResultResp) Reset()
- func (x *ResultResp) String() string
- type Task
- type Timeouts
- func (*Timeouts) Descriptor() ([]byte, []int)deprecated
- func (x *Timeouts) GetAdd() uint64
- func (x *Timeouts) GetDiv() uint64
- func (x *Timeouts) GetMul() uint64
- func (x *Timeouts) GetSub() uint64
- func (*Timeouts) ProtoMessage()
- func (x *Timeouts) ProtoReflect() protoreflect.Message
- func (x *Timeouts) Reset()
- func (x *Timeouts) String() string
- type UnimplementedOrchestratorServer
- func (UnimplementedOrchestratorServer) Connect(Orchestrator_ConnectServer) error
- func (UnimplementedOrchestratorServer) Distribute(context.Context, *Task) (*Empty, error)
- func (UnimplementedOrchestratorServer) Pong(context.Context, *PongReq) (*Empty, error)
- func (UnimplementedOrchestratorServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
- type UnsafeOrchestratorServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_models_proto protoreflect.FileDescriptor
var File_proto_orchestrator_proto protoreflect.FileDescriptor
var Orchestrator_ServiceDesc = grpc.ServiceDesc{ ServiceName: "github.com.eonias189.calculationService.proto.Orchestrator", HandlerType: (*OrchestratorServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Orchestrator_Register_Handler, }, { MethodName: "Distribute", Handler: _Orchestrator_Distribute_Handler, }, { MethodName: "Pong", Handler: _Orchestrator_Pong_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Connect", Handler: _Orchestrator_Connect_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/orchestrator.proto", }
Orchestrator_ServiceDesc is the grpc.ServiceDesc for Orchestrator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrchestratorServer ¶
func RegisterOrchestratorServer(s grpc.ServiceRegistrar, srv OrchestratorServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type OrchestratorClient ¶
type OrchestratorClient interface { Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*RegisterResp, error) Connect(ctx context.Context, opts ...grpc.CallOption) (Orchestrator_ConnectClient, error) Distribute(ctx context.Context, in *Task, opts ...grpc.CallOption) (*Empty, error) Pong(ctx context.Context, in *PongReq, opts ...grpc.CallOption) (*Empty, error) }
OrchestratorClient is the client API for Orchestrator service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOrchestratorClient ¶
func NewOrchestratorClient(cc grpc.ClientConnInterface) OrchestratorClient
type OrchestratorServer ¶
type OrchestratorServer interface { Register(context.Context, *RegisterReq) (*RegisterResp, error) Connect(Orchestrator_ConnectServer) error Distribute(context.Context, *Task) (*Empty, error) Pong(context.Context, *PongReq) (*Empty, error) // contains filtered or unexported methods }
OrchestratorServer is the server API for Orchestrator service. All implementations must embed UnimplementedOrchestratorServer for forward compatibility
type Orchestrator_ConnectClient ¶
type Orchestrator_ConnectClient interface { Send(*ResultResp) error Recv() (*Task, error) grpc.ClientStream }
type Orchestrator_ConnectServer ¶
type Orchestrator_ConnectServer interface { Send(*Task) error Recv() (*ResultResp, error) grpc.ServerStream }
type PongReq ¶
type PongReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` SentTime int64 `protobuf:"varint,2,opt,name=sentTime,proto3" json:"sentTime,omitempty"` // contains filtered or unexported fields }
func (*PongReq) Descriptor
deprecated
func (*PongReq) GetSentTime ¶
func (*PongReq) ProtoMessage ¶
func (*PongReq) ProtoMessage()
func (*PongReq) ProtoReflect ¶
func (x *PongReq) ProtoReflect() protoreflect.Message
type RegisterReq ¶
type RegisterReq struct { MaxThreads int64 `protobuf:"varint,1,opt,name=maxThreads,proto3" json:"maxThreads,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetMaxThreads ¶
func (x *RegisterReq) GetMaxThreads() int64
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
type RegisterResp ¶
type RegisterResp struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*RegisterResp) Descriptor
deprecated
func (*RegisterResp) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResp.ProtoReflect.Descriptor instead.
func (*RegisterResp) GetId ¶
func (x *RegisterResp) GetId() int64
func (*RegisterResp) ProtoMessage ¶
func (*RegisterResp) ProtoMessage()
func (*RegisterResp) ProtoReflect ¶
func (x *RegisterResp) ProtoReflect() protoreflect.Message
func (*RegisterResp) Reset ¶
func (x *RegisterResp) Reset()
func (*RegisterResp) String ¶
func (x *RegisterResp) String() string
type ResultResp ¶
type ResultResp struct { TaskId int64 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId,omitempty"` Result float64 `protobuf:"fixed64,2,opt,name=result,proto3" json:"result,omitempty"` Error bool `protobuf:"varint,3,opt,name=error,proto3" json:"error,omitempty"` RunningThreads int64 `protobuf:"varint,5,opt,name=runningThreads,proto3" json:"runningThreads,omitempty"` // contains filtered or unexported fields }
func (*ResultResp) Descriptor
deprecated
func (*ResultResp) Descriptor() ([]byte, []int)
Deprecated: Use ResultResp.ProtoReflect.Descriptor instead.
func (*ResultResp) GetError ¶
func (x *ResultResp) GetError() bool
func (*ResultResp) GetResult ¶
func (x *ResultResp) GetResult() float64
func (*ResultResp) GetRunningThreads ¶
func (x *ResultResp) GetRunningThreads() int64
func (*ResultResp) GetTaskId ¶
func (x *ResultResp) GetTaskId() int64
func (*ResultResp) ProtoMessage ¶
func (*ResultResp) ProtoMessage()
func (*ResultResp) ProtoReflect ¶
func (x *ResultResp) ProtoReflect() protoreflect.Message
func (*ResultResp) Reset ¶
func (x *ResultResp) Reset()
func (*ResultResp) String ¶
func (x *ResultResp) String() string
type Task ¶
type Task struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` Timeouts *Timeouts `protobuf:"bytes,3,opt,name=timeouts,proto3" json:"timeouts,omitempty"` // contains filtered or unexported fields }
func (*Task) Descriptor
deprecated
func (*Task) GetExpression ¶
func (*Task) GetTimeouts ¶
func (*Task) ProtoMessage ¶
func (*Task) ProtoMessage()
func (*Task) ProtoReflect ¶
func (x *Task) ProtoReflect() protoreflect.Message
type Timeouts ¶
type Timeouts struct { Add uint64 `protobuf:"varint,1,opt,name=add,proto3" json:"add,omitempty"` Sub uint64 `protobuf:"varint,2,opt,name=sub,proto3" json:"sub,omitempty"` Mul uint64 `protobuf:"varint,3,opt,name=mul,proto3" json:"mul,omitempty"` Div uint64 `protobuf:"varint,4,opt,name=div,proto3" json:"div,omitempty"` // contains filtered or unexported fields }
func (*Timeouts) Descriptor
deprecated
func (*Timeouts) ProtoMessage ¶
func (*Timeouts) ProtoMessage()
func (*Timeouts) ProtoReflect ¶
func (x *Timeouts) ProtoReflect() protoreflect.Message
type UnimplementedOrchestratorServer ¶
type UnimplementedOrchestratorServer struct { }
UnimplementedOrchestratorServer must be embedded to have forward compatible implementations.
func (UnimplementedOrchestratorServer) Connect ¶
func (UnimplementedOrchestratorServer) Connect(Orchestrator_ConnectServer) error
func (UnimplementedOrchestratorServer) Distribute ¶
func (UnimplementedOrchestratorServer) Register ¶
func (UnimplementedOrchestratorServer) Register(context.Context, *RegisterReq) (*RegisterResp, error)
type UnsafeOrchestratorServer ¶
type UnsafeOrchestratorServer interface {
// contains filtered or unexported methods
}
UnsafeOrchestratorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrchestratorServer will result in compilation errors.