Documentation
¶
Index ¶
Constants ¶
const ( Template_Increment_FullMethodName = "/proto.Template/Increment" Template_SayHi_FullMethodName = "/proto.Template/SayHi" )
Variables ¶
var File_proto_template_proto protoreflect.FileDescriptor
var Template_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.Template", HandlerType: (*TemplateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Increment", Handler: _Template_Increment_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SayHi", Handler: _Template_SayHi_Handler, ClientStreams: true, }, }, Metadata: "proto/template.proto", }
Template_ServiceDesc is the grpc.ServiceDesc for Template service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTemplateServer ¶
func RegisterTemplateServer(s grpc.ServiceRegistrar, srv TemplateServer)
Types ¶
type Ack ¶
type Ack struct { NewValue int64 `protobuf:"varint,1,opt,name=newValue,proto3" json:"newValue,omitempty"` // contains filtered or unexported fields }
func (*Ack) Descriptor
deprecated
func (*Ack) GetNewValue ¶
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
type Amount ¶
type Amount struct { ClientName string `protobuf:"bytes,1,opt,name=clientName,proto3" json:"clientName,omitempty"` Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Amount is a type containing a string and int. They are intialized as the first and second parameter value.
func (*Amount) Descriptor
deprecated
func (*Amount) GetClientName ¶
func (*Amount) ProtoMessage ¶
func (*Amount) ProtoMessage()
func (*Amount) ProtoReflect ¶
func (x *Amount) ProtoReflect() protoreflect.Message
type Farewell ¶
type Farewell struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Farewell) Descriptor
deprecated
func (*Farewell) GetMessage ¶
func (*Farewell) ProtoMessage ¶
func (*Farewell) ProtoMessage()
func (*Farewell) ProtoReflect ¶
func (x *Farewell) ProtoReflect() protoreflect.Message
type Greeding ¶
type Greeding struct { ClientName string `protobuf:"bytes,1,opt,name=clientName,proto3" json:"clientName,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Greeding) Descriptor
deprecated
func (*Greeding) GetClientName ¶
func (*Greeding) GetMessage ¶
func (*Greeding) ProtoMessage ¶
func (*Greeding) ProtoMessage()
func (*Greeding) ProtoReflect ¶
func (x *Greeding) ProtoReflect() protoreflect.Message
type TemplateClient ¶
type TemplateClient interface { // one message is sent and one is recieved Increment(ctx context.Context, in *Amount, opts ...grpc.CallOption) (*Ack, error) // many messages are sent and one is recieved SayHi(ctx context.Context, opts ...grpc.CallOption) (Template_SayHiClient, error) }
TemplateClient is the client API for Template 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 NewTemplateClient ¶
func NewTemplateClient(cc grpc.ClientConnInterface) TemplateClient
type TemplateServer ¶
type TemplateServer interface { // one message is sent and one is recieved Increment(context.Context, *Amount) (*Ack, error) // many messages are sent and one is recieved SayHi(Template_SayHiServer) error // contains filtered or unexported methods }
TemplateServer is the server API for Template service. All implementations must embed UnimplementedTemplateServer for forward compatibility
type Template_SayHiClient ¶
type Template_SayHiServer ¶
type UnimplementedTemplateServer ¶
type UnimplementedTemplateServer struct { }
UnimplementedTemplateServer must be embedded to have forward compatible implementations.
func (UnimplementedTemplateServer) SayHi ¶
func (UnimplementedTemplateServer) SayHi(Template_SayHiServer) error
type UnsafeTemplateServer ¶
type UnsafeTemplateServer interface {
// contains filtered or unexported methods
}
UnsafeTemplateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TemplateServer will result in compilation errors.