Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
- type CallOpRequest
- type CallOpResponse
- type Empty
- type GetValueResponse
- type UnimplementedWorkerServiceServer
- func (UnimplementedWorkerServiceServer) CallOp(context.Context, *CallOpRequest) (*CallOpResponse, error)
- func (UnimplementedWorkerServiceServer) GetValue(context.Context, *Empty) (*GetValueResponse, error)
- func (UnimplementedWorkerServiceServer) Start(context.Context, *Empty) (*Empty, error)
- func (UnimplementedWorkerServiceServer) Subscribe(*Empty, grpc.ServerStreamingServer[Empty]) error
- type UnsafeWorkerServiceServer
- type WorkerServiceClient
- type WorkerServiceServer
- type WorkerService_SubscribeClient
- type WorkerService_SubscribeServer
Constants ¶
const ( WorkerService_Start_FullMethodName = "/proto.WorkerService/Start" WorkerService_CallOp_FullMethodName = "/proto.WorkerService/CallOp" WorkerService_Subscribe_FullMethodName = "/proto.WorkerService/Subscribe" WorkerService_GetValue_FullMethodName = "/proto.WorkerService/GetValue" )
Variables ¶
var File_proto_worker_proto protoreflect.FileDescriptor
var WorkerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.WorkerService", HandlerType: (*WorkerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _WorkerService_Start_Handler, }, { MethodName: "CallOp", Handler: _WorkerService_CallOp_Handler, }, { MethodName: "GetValue", Handler: _WorkerService_GetValue_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _WorkerService_Subscribe_Handler, ServerStreams: true, }, }, Metadata: "proto/worker.proto", }
WorkerService_ServiceDesc is the grpc.ServiceDesc for WorkerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWorkerServiceServer ¶
func RegisterWorkerServiceServer(s grpc.ServiceRegistrar, srv WorkerServiceServer)
Types ¶
type CallOpRequest ¶
type CallOpRequest struct { Op int32 `protobuf:"varint,1,opt,name=op,proto3" json:"op,omitempty"` // contains filtered or unexported fields }
func (*CallOpRequest) Descriptor
deprecated
func (*CallOpRequest) Descriptor() ([]byte, []int)
Deprecated: Use CallOpRequest.ProtoReflect.Descriptor instead.
func (*CallOpRequest) GetOp ¶
func (x *CallOpRequest) GetOp() int32
func (*CallOpRequest) ProtoMessage ¶
func (*CallOpRequest) ProtoMessage()
func (*CallOpRequest) ProtoReflect ¶
func (x *CallOpRequest) ProtoReflect() protoreflect.Message
func (*CallOpRequest) Reset ¶
func (x *CallOpRequest) Reset()
func (*CallOpRequest) String ¶
func (x *CallOpRequest) String() string
type CallOpResponse ¶
type CallOpResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*CallOpResponse) Descriptor
deprecated
func (*CallOpResponse) Descriptor() ([]byte, []int)
Deprecated: Use CallOpResponse.ProtoReflect.Descriptor instead.
func (*CallOpResponse) GetSuccess ¶
func (x *CallOpResponse) GetSuccess() bool
func (*CallOpResponse) ProtoMessage ¶
func (*CallOpResponse) ProtoMessage()
func (*CallOpResponse) ProtoReflect ¶
func (x *CallOpResponse) ProtoReflect() protoreflect.Message
func (*CallOpResponse) Reset ¶
func (x *CallOpResponse) Reset()
func (*CallOpResponse) String ¶
func (x *CallOpResponse) String() string
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 GetValueResponse ¶
type GetValueResponse struct { Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GetValueResponse) Descriptor
deprecated
func (*GetValueResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetValueResponse.ProtoReflect.Descriptor instead.
func (*GetValueResponse) GetValue ¶
func (x *GetValueResponse) GetValue() int32
func (*GetValueResponse) ProtoMessage ¶
func (*GetValueResponse) ProtoMessage()
func (*GetValueResponse) ProtoReflect ¶
func (x *GetValueResponse) ProtoReflect() protoreflect.Message
func (*GetValueResponse) Reset ¶
func (x *GetValueResponse) Reset()
func (*GetValueResponse) String ¶
func (x *GetValueResponse) String() string
type UnimplementedWorkerServiceServer ¶
type UnimplementedWorkerServiceServer struct{}
UnimplementedWorkerServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedWorkerServiceServer) CallOp ¶
func (UnimplementedWorkerServiceServer) CallOp(context.Context, *CallOpRequest) (*CallOpResponse, error)
func (UnimplementedWorkerServiceServer) GetValue ¶
func (UnimplementedWorkerServiceServer) GetValue(context.Context, *Empty) (*GetValueResponse, error)
func (UnimplementedWorkerServiceServer) Subscribe ¶
func (UnimplementedWorkerServiceServer) Subscribe(*Empty, grpc.ServerStreamingServer[Empty]) error
type UnsafeWorkerServiceServer ¶
type UnsafeWorkerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWorkerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WorkerServiceServer will result in compilation errors.
type WorkerServiceClient ¶
type WorkerServiceClient interface { Start(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) CallOp(ctx context.Context, in *CallOpRequest, opts ...grpc.CallOption) (*CallOpResponse, error) Subscribe(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Empty], error) GetValue(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetValueResponse, error) }
WorkerServiceClient is the client API for WorkerService 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 NewWorkerServiceClient ¶
func NewWorkerServiceClient(cc grpc.ClientConnInterface) WorkerServiceClient
type WorkerServiceServer ¶
type WorkerServiceServer interface { Start(context.Context, *Empty) (*Empty, error) CallOp(context.Context, *CallOpRequest) (*CallOpResponse, error) Subscribe(*Empty, grpc.ServerStreamingServer[Empty]) error GetValue(context.Context, *Empty) (*GetValueResponse, error) // contains filtered or unexported methods }
WorkerServiceServer is the server API for WorkerService service. All implementations must embed UnimplementedWorkerServiceServer for forward compatibility.
type WorkerService_SubscribeClient ¶
type WorkerService_SubscribeClient = grpc.ServerStreamingClient[Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type WorkerService_SubscribeServer ¶
type WorkerService_SubscribeServer = grpc.ServerStreamingServer[Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.