proto

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
var File_proto_worker_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) GetValue

func (UnimplementedWorkerServiceServer) Start

func (UnimplementedWorkerServiceServer) Subscribe

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.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL