Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterStackServiceServer(s grpc.ServiceRegistrar, srv StackServiceServer)
- type PopServiceReply
- func (*PopServiceReply) Descriptor() ([]byte, []int)deprecated
- func (x *PopServiceReply) GetEmpty() bool
- func (x *PopServiceReply) GetNumber() int32
- func (*PopServiceReply) ProtoMessage()
- func (x *PopServiceReply) ProtoReflect() protoreflect.Message
- func (x *PopServiceReply) Reset()
- func (x *PopServiceReply) String() string
- type PopServiceRequest
- type PushServiceReply
- type PushServiceRequest
- func (*PushServiceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushServiceRequest) GetNumber() int32
- func (*PushServiceRequest) ProtoMessage()
- func (x *PushServiceRequest) ProtoReflect() protoreflect.Message
- func (x *PushServiceRequest) Reset()
- func (x *PushServiceRequest) String() string
- type StackServiceClient
- type StackServiceServer
- type UnimplementedStackServiceServer
- type UnsafeStackServiceServer
Constants ¶
const ( StackService_Push_FullMethodName = "/StackService/Push" StackService_Pop_FullMethodName = "/StackService/Pop" )
Variables ¶
var File_stack_proto protoreflect.FileDescriptor
var StackService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "StackService", HandlerType: (*StackServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Push", Handler: _StackService_Push_Handler, }, { MethodName: "Pop", Handler: _StackService_Pop_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "stack.proto", }
StackService_ServiceDesc is the grpc.ServiceDesc for StackService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterStackServiceServer ¶
func RegisterStackServiceServer(s grpc.ServiceRegistrar, srv StackServiceServer)
Types ¶
type PopServiceReply ¶
type PopServiceReply struct { Number int32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"` Empty bool `protobuf:"varint,5,opt,name=empty,proto3" json:"empty,omitempty"` // contains filtered or unexported fields }
func (*PopServiceReply) Descriptor
deprecated
func (*PopServiceReply) Descriptor() ([]byte, []int)
Deprecated: Use PopServiceReply.ProtoReflect.Descriptor instead.
func (*PopServiceReply) GetEmpty ¶
func (x *PopServiceReply) GetEmpty() bool
func (*PopServiceReply) GetNumber ¶
func (x *PopServiceReply) GetNumber() int32
func (*PopServiceReply) ProtoMessage ¶
func (*PopServiceReply) ProtoMessage()
func (*PopServiceReply) ProtoReflect ¶
func (x *PopServiceReply) ProtoReflect() protoreflect.Message
func (*PopServiceReply) Reset ¶
func (x *PopServiceReply) Reset()
func (*PopServiceReply) String ¶
func (x *PopServiceReply) String() string
type PopServiceRequest ¶
type PopServiceRequest struct { Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*PopServiceRequest) Descriptor
deprecated
func (*PopServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use PopServiceRequest.ProtoReflect.Descriptor instead.
func (*PopServiceRequest) GetNumber ¶
func (x *PopServiceRequest) GetNumber() int32
func (*PopServiceRequest) ProtoMessage ¶
func (*PopServiceRequest) ProtoMessage()
func (*PopServiceRequest) ProtoReflect ¶
func (x *PopServiceRequest) ProtoReflect() protoreflect.Message
func (*PopServiceRequest) Reset ¶
func (x *PopServiceRequest) Reset()
func (*PopServiceRequest) String ¶
func (x *PopServiceRequest) String() string
type PushServiceReply ¶
type PushServiceReply struct { Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` // contains filtered or unexported fields }
func (*PushServiceReply) Descriptor
deprecated
func (*PushServiceReply) Descriptor() ([]byte, []int)
Deprecated: Use PushServiceReply.ProtoReflect.Descriptor instead.
func (*PushServiceReply) GetSize ¶
func (x *PushServiceReply) GetSize() int32
func (*PushServiceReply) ProtoMessage ¶
func (*PushServiceReply) ProtoMessage()
func (*PushServiceReply) ProtoReflect ¶
func (x *PushServiceReply) ProtoReflect() protoreflect.Message
func (*PushServiceReply) Reset ¶
func (x *PushServiceReply) Reset()
func (*PushServiceReply) String ¶
func (x *PushServiceReply) String() string
type PushServiceRequest ¶
type PushServiceRequest struct { Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` // contains filtered or unexported fields }
func (*PushServiceRequest) Descriptor
deprecated
func (*PushServiceRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushServiceRequest.ProtoReflect.Descriptor instead.
func (*PushServiceRequest) GetNumber ¶
func (x *PushServiceRequest) GetNumber() int32
func (*PushServiceRequest) ProtoMessage ¶
func (*PushServiceRequest) ProtoMessage()
func (*PushServiceRequest) ProtoReflect ¶
func (x *PushServiceRequest) ProtoReflect() protoreflect.Message
func (*PushServiceRequest) Reset ¶
func (x *PushServiceRequest) Reset()
func (*PushServiceRequest) String ¶
func (x *PushServiceRequest) String() string
type StackServiceClient ¶
type StackServiceClient interface { Push(ctx context.Context, in *PushServiceRequest, opts ...grpc.CallOption) (*PushServiceReply, error) Pop(ctx context.Context, in *PopServiceRequest, opts ...grpc.CallOption) (*PopServiceReply, error) }
StackServiceClient is the client API for StackService 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 NewStackServiceClient ¶
func NewStackServiceClient(cc grpc.ClientConnInterface) StackServiceClient
type StackServiceServer ¶
type StackServiceServer interface { Push(context.Context, *PushServiceRequest) (*PushServiceReply, error) Pop(context.Context, *PopServiceRequest) (*PopServiceReply, error) // contains filtered or unexported methods }
StackServiceServer is the server API for StackService service. All implementations must embed UnimplementedStackServiceServer for forward compatibility
type UnimplementedStackServiceServer ¶
type UnimplementedStackServiceServer struct { }
UnimplementedStackServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedStackServiceServer) Pop ¶
func (UnimplementedStackServiceServer) Pop(context.Context, *PopServiceRequest) (*PopServiceReply, error)
func (UnimplementedStackServiceServer) Push ¶
func (UnimplementedStackServiceServer) Push(context.Context, *PushServiceRequest) (*PushServiceReply, error)
type UnsafeStackServiceServer ¶
type UnsafeStackServiceServer interface {
// contains filtered or unexported methods
}
UnsafeStackServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StackServiceServer will result in compilation errors.