svcmeta

package
v0.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrpcMetadata_Metadata_FullMethodName = "/GrpcMetadata/Metadata"
)

Variables

View Source
var File_grpcmetadataspec_proto protoreflect.FileDescriptor
View Source
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.

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 (*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

type UnimplementedGrpcMetadataServer

type UnimplementedGrpcMetadataServer struct {
}

UnimplementedGrpcMetadataServer must be embedded to have forward compatible implementations.

func (UnimplementedGrpcMetadataServer) Metadata

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL