Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type IncrementReply
- func (*IncrementReply) Descriptor() ([]byte, []int)deprecated
- func (x *IncrementReply) GetSuccess() bool
- func (x *IncrementReply) GetValueBefore() int32
- func (*IncrementReply) ProtoMessage()
- func (x *IncrementReply) ProtoReflect() protoreflect.Message
- func (x *IncrementReply) Reset()
- func (x *IncrementReply) String() string
- type IncrementRequest
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_Proto_Service_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "increment", Handler: _Service_Increment_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "Proto/Service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type IncrementReply ¶
type IncrementReply struct { Success bool `protobuf:"varint,1,opt,name=Success,proto3" json:"Success,omitempty"` ValueBefore int32 `protobuf:"varint,2,opt,name=ValueBefore,proto3" json:"ValueBefore,omitempty"` // contains filtered or unexported fields }
func (*IncrementReply) Descriptor
deprecated
func (*IncrementReply) Descriptor() ([]byte, []int)
Deprecated: Use IncrementReply.ProtoReflect.Descriptor instead.
func (*IncrementReply) GetSuccess ¶
func (x *IncrementReply) GetSuccess() bool
func (*IncrementReply) GetValueBefore ¶
func (x *IncrementReply) GetValueBefore() int32
func (*IncrementReply) ProtoMessage ¶
func (*IncrementReply) ProtoMessage()
func (*IncrementReply) ProtoReflect ¶
func (x *IncrementReply) ProtoReflect() protoreflect.Message
func (*IncrementReply) Reset ¶
func (x *IncrementReply) Reset()
func (*IncrementReply) String ¶
func (x *IncrementReply) String() string
type IncrementRequest ¶
type IncrementRequest struct { Value int32 `protobuf:"varint,1,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*IncrementRequest) Descriptor
deprecated
func (*IncrementRequest) Descriptor() ([]byte, []int)
Deprecated: Use IncrementRequest.ProtoReflect.Descriptor instead.
func (*IncrementRequest) GetValue ¶
func (x *IncrementRequest) GetValue() int32
func (*IncrementRequest) ProtoMessage ¶
func (*IncrementRequest) ProtoMessage()
func (*IncrementRequest) ProtoReflect ¶
func (x *IncrementRequest) ProtoReflect() protoreflect.Message
func (*IncrementRequest) Reset ¶
func (x *IncrementRequest) Reset()
func (*IncrementRequest) String ¶
func (x *IncrementRequest) String() string
type ServiceClient ¶
type ServiceClient interface {
Increment(ctx context.Context, in *IncrementRequest, opts ...grpc.CallOption) (*IncrementReply, error)
}
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { Increment(context.Context, *IncrementRequest) (*IncrementReply, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Increment ¶
func (UnimplementedServiceServer) Increment(context.Context, *IncrementRequest) (*IncrementReply, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.