Documentation ¶
Overview ¶
Package server provides a GRPC based server
Index ¶
- Variables
- func GetProtos() map[string]string
- func RegisterRunnerServer(s grpc.ServiceRegistrar, srv RunnerServer)
- type HelloReply
- func (*HelloReply) Descriptor() ([]byte, []int)
- func (m *HelloReply) GetMessage() string
- func (*HelloReply) ProtoMessage()
- func (m *HelloReply) Reset()
- func (m *HelloReply) String() string
- func (m *HelloReply) XXX_DiscardUnknown()
- func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloReply) XXX_Merge(src proto.Message)
- func (m *HelloReply) XXX_Size() int
- func (m *HelloReply) XXX_Unmarshal(b []byte) error
- type RunnerClient
- type RunnerServer
- type TestTask
- func (*TestTask) Descriptor() ([]byte, []int)
- func (m *TestTask) GetData() string
- func (m *TestTask) GetKind() string
- func (*TestTask) ProtoMessage()
- func (m *TestTask) Reset()
- func (m *TestTask) String() string
- func (m *TestTask) XXX_DiscardUnknown()
- func (m *TestTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TestTask) XXX_Merge(src proto.Message)
- func (m *TestTask) XXX_Size() int
- func (m *TestTask) XXX_Unmarshal(b []byte) error
- type UnimplementedRunnerServer
- type UnsafeRunnerServer
Constants ¶
This section is empty.
Variables ¶
var Runner_ServiceDesc = grpc.ServiceDesc{ ServiceName: "server.Runner", HandlerType: (*RunnerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Run", Handler: _Runner_Run_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/server/server.proto", }
Runner_ServiceDesc is the grpc.ServiceDesc for Runner service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRunnerServer ¶
func RegisterRunnerServer(s grpc.ServiceRegistrar, srv RunnerServer)
Types ¶
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HelloReply) Descriptor ¶
func (*HelloReply) Descriptor() ([]byte, []int)
func (*HelloReply) GetMessage ¶
func (m *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) Reset ¶
func (m *HelloReply) Reset()
func (*HelloReply) String ¶
func (m *HelloReply) String() string
func (*HelloReply) XXX_DiscardUnknown ¶
func (m *HelloReply) XXX_DiscardUnknown()
func (*HelloReply) XXX_Marshal ¶
func (m *HelloReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloReply) XXX_Merge ¶
func (m *HelloReply) XXX_Merge(src proto.Message)
func (*HelloReply) XXX_Size ¶
func (m *HelloReply) XXX_Size() int
func (*HelloReply) XXX_Unmarshal ¶
func (m *HelloReply) XXX_Unmarshal(b []byte) error
type RunnerClient ¶
type RunnerClient interface {
Run(ctx context.Context, in *TestTask, opts ...grpc.CallOption) (*HelloReply, error)
}
RunnerClient is the client API for Runner 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 NewRunnerClient ¶
func NewRunnerClient(cc grpc.ClientConnInterface) RunnerClient
type RunnerServer ¶
type RunnerServer interface { Run(context.Context, *TestTask) (*HelloReply, error) // contains filtered or unexported methods }
RunnerServer is the server API for Runner service. All implementations must embed UnimplementedRunnerServer for forward compatibility
func NewRemoteServer ¶
func NewRemoteServer() RunnerServer
NewRemoteServer creates a remote server instance
type TestTask ¶
type TestTask struct { Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TestTask) Descriptor ¶
func (*TestTask) ProtoMessage ¶
func (*TestTask) ProtoMessage()
func (*TestTask) XXX_DiscardUnknown ¶
func (m *TestTask) XXX_DiscardUnknown()
func (*TestTask) XXX_Marshal ¶
func (*TestTask) XXX_Unmarshal ¶
type UnimplementedRunnerServer ¶
type UnimplementedRunnerServer struct { }
UnimplementedRunnerServer must be embedded to have forward compatible implementations.
func (UnimplementedRunnerServer) Run ¶
func (UnimplementedRunnerServer) Run(context.Context, *TestTask) (*HelloReply, error)
type UnsafeRunnerServer ¶
type UnsafeRunnerServer interface {
// contains filtered or unexported methods
}
UnsafeRunnerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RunnerServer will result in compilation errors.