Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGrpcMetadataServer(s grpc.ServiceRegistrar, srv GrpcMetadataServer)
- type GrpcMetadataClient
- type GrpcMetadataReply
- func (*GrpcMetadataReply) Descriptor() ([]byte, []int)deprecated
- func (x *GrpcMetadataReply) GetMetadata() []*GrpcServerMetadata
- func (*GrpcMetadataReply) ProtoMessage()
- func (x *GrpcMetadataReply) ProtoReflect() protoreflect.Message
- func (x *GrpcMetadataReply) Reset()
- func (x *GrpcMetadataReply) String() string
- type GrpcMetadataRequest
- func (*GrpcMetadataRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GrpcMetadataRequest) GetService() string
- func (*GrpcMetadataRequest) ProtoMessage()
- func (x *GrpcMetadataRequest) ProtoReflect() protoreflect.Message
- func (x *GrpcMetadataRequest) Reset()
- func (x *GrpcMetadataRequest) String() string
- type GrpcMetadataServer
- type GrpcServerMetadata
- func (*GrpcServerMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *GrpcServerMetadata) GetKey() string
- func (x *GrpcServerMetadata) GetValue() string
- func (*GrpcServerMetadata) ProtoMessage()
- func (x *GrpcServerMetadata) ProtoReflect() protoreflect.Message
- func (x *GrpcServerMetadata) Reset()
- func (x *GrpcServerMetadata) String() string
- type InfoClient
- type ServerInfo
- type UnimplementedGrpcMetadataServer
- type UnsafeGrpcMetadataServer
Constants ¶
const (
GrpcMetadata_Metadata_FullMethodName = "/GrpcMetadata/Metadata"
)
Variables ¶
var File_grpcmetadataspec_proto protoreflect.FileDescriptor
var GrpcMetadata_ServiceDesc = grpc.ServiceDesc{ ServiceName: "GrpcMetadata", HandlerType: (*GrpcMetadataServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Metadata", Handler: _GrpcMetadata_Metadata_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "grpcmetadataspec.proto", }
GrpcMetadata_ServiceDesc is the grpc.ServiceDesc for GrpcMetadata service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGrpcMetadataServer ¶
func RegisterGrpcMetadataServer(s grpc.ServiceRegistrar, srv GrpcMetadataServer)
Types ¶
type GrpcMetadataClient ¶
type GrpcMetadataClient interface {
Metadata(ctx context.Context, in *GrpcMetadataRequest, opts ...grpc.CallOption) (*GrpcMetadataReply, error)
}
GrpcMetadataClient is the client API for GrpcMetadata 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 NewGrpcMetadataClient ¶
func NewGrpcMetadataClient(cc grpc.ClientConnInterface) GrpcMetadataClient
type GrpcMetadataReply ¶
type GrpcMetadataReply struct { Metadata []*GrpcServerMetadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*GrpcMetadataReply) Descriptor
deprecated
func (*GrpcMetadataReply) Descriptor() ([]byte, []int)
Deprecated: Use GrpcMetadataReply.ProtoReflect.Descriptor instead.
func (*GrpcMetadataReply) GetMetadata ¶
func (x *GrpcMetadataReply) GetMetadata() []*GrpcServerMetadata
func (*GrpcMetadataReply) ProtoMessage ¶
func (*GrpcMetadataReply) ProtoMessage()
func (*GrpcMetadataReply) ProtoReflect ¶
func (x *GrpcMetadataReply) ProtoReflect() protoreflect.Message
func (*GrpcMetadataReply) Reset ¶
func (x *GrpcMetadataReply) Reset()
func (*GrpcMetadataReply) String ¶
func (x *GrpcMetadataReply) String() string
type GrpcMetadataRequest ¶
type GrpcMetadataRequest struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` // contains filtered or unexported fields }
func (*GrpcMetadataRequest) Descriptor
deprecated
func (*GrpcMetadataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GrpcMetadataRequest.ProtoReflect.Descriptor instead.
func (*GrpcMetadataRequest) GetService ¶
func (x *GrpcMetadataRequest) GetService() string
func (*GrpcMetadataRequest) ProtoMessage ¶
func (*GrpcMetadataRequest) ProtoMessage()
func (*GrpcMetadataRequest) ProtoReflect ¶
func (x *GrpcMetadataRequest) ProtoReflect() protoreflect.Message
func (*GrpcMetadataRequest) Reset ¶
func (x *GrpcMetadataRequest) Reset()
func (*GrpcMetadataRequest) String ¶
func (x *GrpcMetadataRequest) String() string
type GrpcMetadataServer ¶
type GrpcMetadataServer interface { Metadata(context.Context, *GrpcMetadataRequest) (*GrpcMetadataReply, error) // contains filtered or unexported methods }
GrpcMetadataServer is the server API for GrpcMetadata service. All implementations must embed UnimplementedGrpcMetadataServer for forward compatibility
type GrpcServerMetadata ¶
type GrpcServerMetadata struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*GrpcServerMetadata) Descriptor
deprecated
func (*GrpcServerMetadata) Descriptor() ([]byte, []int)
Deprecated: Use GrpcServerMetadata.ProtoReflect.Descriptor instead.
func (*GrpcServerMetadata) GetKey ¶
func (x *GrpcServerMetadata) GetKey() string
func (*GrpcServerMetadata) GetValue ¶
func (x *GrpcServerMetadata) GetValue() string
func (*GrpcServerMetadata) ProtoMessage ¶
func (*GrpcServerMetadata) ProtoMessage()
func (*GrpcServerMetadata) ProtoReflect ¶
func (x *GrpcServerMetadata) ProtoReflect() protoreflect.Message
func (*GrpcServerMetadata) Reset ¶
func (x *GrpcServerMetadata) Reset()
func (*GrpcServerMetadata) String ¶
func (x *GrpcServerMetadata) String() string
type InfoClient ¶
type InfoClient struct {
// contains filtered or unexported fields
}
func NewInfoClient ¶
func NewInfoClient(ctx context.Context, addr string, d service.GrpcDialer) (*InfoClient, error)
func NewInfoClientWithConn ¶
func NewInfoClientWithConn(conn *rpc.ClientConn) (*InfoClient, error)
func (*InfoClient) Close ¶
func (c *InfoClient) Close()
func (*InfoClient) Info ¶
func (c *InfoClient) Info(ctx context.Context, in *GrpcMetadataRequest) ([]*GrpcServerMetadata, error)
func (*InfoClient) InfoAsMap ¶
func (c *InfoClient) InfoAsMap(ctx context.Context, in *GrpcMetadataRequest) (map[string]string, error)
type ServerInfo ¶
type ServerInfo struct { UnimplementedGrpcMetadataServer // contains filtered or unexported fields }
func NewServerInfo ¶
func NewServerInfo(metadata map[string]string) *ServerInfo
func (*ServerInfo) Metadata ¶
func (g *ServerInfo) Metadata(_ context.Context, _ *GrpcMetadataRequest) (*GrpcMetadataReply, error)
type UnimplementedGrpcMetadataServer ¶
type UnimplementedGrpcMetadataServer struct { }
UnimplementedGrpcMetadataServer must be embedded to have forward compatible implementations.
func (UnimplementedGrpcMetadataServer) Metadata ¶
func (UnimplementedGrpcMetadataServer) Metadata(context.Context, *GrpcMetadataRequest) (*GrpcMetadataReply, error)
type UnsafeGrpcMetadataServer ¶
type UnsafeGrpcMetadataServer interface {
// contains filtered or unexported methods
}
UnsafeGrpcMetadataServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GrpcMetadataServer will result in compilation errors.