Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_proto_proto_proto protoreflect.FileDescriptor
var Incrementer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Proto.Incrementer", HandlerType: (*IncrementerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Increment", Handler: _Incrementer_Increment_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/proto.proto", }
Incrementer_ServiceDesc is the grpc.ServiceDesc for Incrementer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterIncrementerServer ¶
func RegisterIncrementerServer(s grpc.ServiceRegistrar, srv IncrementerServer)
Types ¶
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 IncrementerClient ¶
type IncrementerClient interface {
Increment(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Value, error)
}
IncrementerClient is the client API for Incrementer 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 NewIncrementerClient ¶
func NewIncrementerClient(cc grpc.ClientConnInterface) IncrementerClient
type IncrementerServer ¶
type IncrementerServer interface { Increment(context.Context, *Empty) (*Value, error) // contains filtered or unexported methods }
IncrementerServer is the server API for Incrementer service. All implementations must embed UnimplementedIncrementerServer for forward compatibility
type UnimplementedIncrementerServer ¶
type UnimplementedIncrementerServer struct { }
UnimplementedIncrementerServer must be embedded to have forward compatible implementations.
type UnsafeIncrementerServer ¶
type UnsafeIncrementerServer interface {
// contains filtered or unexported methods
}
UnsafeIncrementerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to IncrementerServer will result in compilation errors.
type Value ¶
type Value struct { CurrentNumber int64 `protobuf:"varint,1,opt,name=currentNumber,proto3" json:"currentNumber,omitempty"` // contains filtered or unexported fields }
func (*Value) Descriptor
deprecated
func (*Value) GetCurrentNumber ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message