Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type Extension
- func (*Extension) Descriptor() ([]byte, []int)deprecated
- func (x *Extension) GetElapsed() *durationpb.Duration
- func (x *Extension) GetExtensions() []*Extension
- func (x *Extension) GetMetadata() map[string]string
- func (x *Extension) GetPayload() *anypb.Any
- func (*Extension) ProtoMessage()
- func (x *Extension) ProtoReflect() protoreflect.Message
- func (x *Extension) Reset()
- func (x *Extension) String() string
- type GreeterClient
- type GreeterServer
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetExtensions() []*Extension
- func (x *HelloRequest) GetMessage() string
- func (x *HelloRequest) GetTags() []string
- func (x *HelloRequest) GetTimestamp() uint64
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type HelloResponse
- func (*HelloResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HelloResponse) GetAmount() float32
- func (x *HelloResponse) GetMessage() string
- func (x *HelloResponse) GetTimestamp() uint64
- func (*HelloResponse) ProtoMessage()
- func (x *HelloResponse) ProtoReflect() protoreflect.Message
- func (x *HelloResponse) Reset()
- func (x *HelloResponse) String() string
- type UnimplementedGreeterServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type Extension ¶
type Extension struct { Metadata map[string]string `` /* 157-byte string literal not displayed */ Payload *anypb.Any `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` Elapsed *durationpb.Duration `protobuf:"bytes,3,opt,name=elapsed,proto3" json:"elapsed,omitempty"` Extensions []*Extension `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty"` // contains filtered or unexported fields }
func (*Extension) Descriptor
deprecated
func (*Extension) GetElapsed ¶
func (x *Extension) GetElapsed() *durationpb.Duration
func (*Extension) GetExtensions ¶
func (*Extension) GetMetadata ¶
func (*Extension) GetPayload ¶
func (*Extension) ProtoMessage ¶
func (*Extension) ProtoMessage()
func (*Extension) ProtoReflect ¶
func (x *Extension) ProtoReflect() protoreflect.Message
type GreeterClient ¶
type GreeterClient interface {
Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}
GreeterClient is the client API for Greeter 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 NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface { Hello(context.Context, *HelloRequest) (*HelloResponse, error) // contains filtered or unexported methods }
GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility
type HelloRequest ¶
type HelloRequest struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"` Extensions []*Extension `protobuf:"bytes,4,rep,name=extensions,proto3" json:"extensions,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetExtensions ¶
func (x *HelloRequest) GetExtensions() []*Extension
func (*HelloRequest) GetMessage ¶
func (x *HelloRequest) GetMessage() string
func (*HelloRequest) GetTags ¶
func (x *HelloRequest) GetTags() []string
func (*HelloRequest) GetTimestamp ¶
func (x *HelloRequest) GetTimestamp() uint64
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type HelloResponse ¶
type HelloResponse struct { Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Amount float32 `protobuf:"fixed32,3,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*HelloResponse) Descriptor
deprecated
func (*HelloResponse) Descriptor() ([]byte, []int)
Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead.
func (*HelloResponse) GetAmount ¶
func (x *HelloResponse) GetAmount() float32
func (*HelloResponse) GetMessage ¶
func (x *HelloResponse) GetMessage() string
func (*HelloResponse) GetTimestamp ¶
func (x *HelloResponse) GetTimestamp() uint64
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) ProtoReflect ¶
func (x *HelloResponse) ProtoReflect() protoreflect.Message
func (*HelloResponse) Reset ¶
func (x *HelloResponse) Reset()
func (*HelloResponse) String ¶
func (x *HelloResponse) String() string
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer must be embedded to have forward compatible implementations.
func (*UnimplementedGreeterServer) Hello ¶
func (*UnimplementedGreeterServer) Hello(context.Context, *HelloRequest) (*HelloResponse, error)
Click to show internal directories.
Click to hide internal directories.