reflection

package
v8.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package reflection is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthReflection        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowReflection          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupReflection = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterReflectionServiceHandler

func RegisterReflectionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterReflectionServiceHandler registers the http handlers for service ReflectionService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterReflectionServiceHandlerClient

func RegisterReflectionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ReflectionServiceClient) error

RegisterReflectionServiceHandlerClient registers the http handlers for service ReflectionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ReflectionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ReflectionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ReflectionServiceClient" to call the correct interceptors.

func RegisterReflectionServiceHandlerFromEndpoint

func RegisterReflectionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterReflectionServiceHandlerFromEndpoint is same as RegisterReflectionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterReflectionServiceHandlerServer

func RegisterReflectionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ReflectionServiceServer) error

RegisterReflectionServiceHandlerServer registers the http handlers for service ReflectionService to "mux". UnaryRPC :call ReflectionServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterReflectionServiceHandlerFromEndpoint instead.

func RegisterReflectionServiceServer

func RegisterReflectionServiceServer(s grpc1.Server, srv ReflectionServiceServer)

Types

type ListAllInterfacesRequest

type ListAllInterfacesRequest struct {
}

ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC.

func (*ListAllInterfacesRequest) Descriptor

func (*ListAllInterfacesRequest) Descriptor() ([]byte, []int)

func (*ListAllInterfacesRequest) Marshal

func (m *ListAllInterfacesRequest) Marshal() (dAtA []byte, err error)

func (*ListAllInterfacesRequest) MarshalTo

func (m *ListAllInterfacesRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListAllInterfacesRequest) MarshalToSizedBuffer

func (m *ListAllInterfacesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListAllInterfacesRequest) ProtoMessage

func (*ListAllInterfacesRequest) ProtoMessage()

func (*ListAllInterfacesRequest) Reset

func (m *ListAllInterfacesRequest) Reset()

func (*ListAllInterfacesRequest) Size

func (m *ListAllInterfacesRequest) Size() (n int)

func (*ListAllInterfacesRequest) String

func (m *ListAllInterfacesRequest) String() string

func (*ListAllInterfacesRequest) Unmarshal

func (m *ListAllInterfacesRequest) Unmarshal(dAtA []byte) error

func (*ListAllInterfacesRequest) XXX_DiscardUnknown

func (m *ListAllInterfacesRequest) XXX_DiscardUnknown()

func (*ListAllInterfacesRequest) XXX_Marshal

func (m *ListAllInterfacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAllInterfacesRequest) XXX_Merge

func (m *ListAllInterfacesRequest) XXX_Merge(src proto.Message)

func (*ListAllInterfacesRequest) XXX_Size

func (m *ListAllInterfacesRequest) XXX_Size() int

func (*ListAllInterfacesRequest) XXX_Unmarshal

func (m *ListAllInterfacesRequest) XXX_Unmarshal(b []byte) error

type ListAllInterfacesResponse

type ListAllInterfacesResponse struct {
	// interface_names is an array of all the registered interfaces.
	InterfaceNames []string `protobuf:"bytes,1,rep,name=interface_names,json=interfaceNames,proto3" json:"interface_names,omitempty"`
}

ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC.

func (*ListAllInterfacesResponse) Descriptor

func (*ListAllInterfacesResponse) Descriptor() ([]byte, []int)

func (*ListAllInterfacesResponse) GetInterfaceNames

func (m *ListAllInterfacesResponse) GetInterfaceNames() []string

func (*ListAllInterfacesResponse) Marshal

func (m *ListAllInterfacesResponse) Marshal() (dAtA []byte, err error)

func (*ListAllInterfacesResponse) MarshalTo

func (m *ListAllInterfacesResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListAllInterfacesResponse) MarshalToSizedBuffer

func (m *ListAllInterfacesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListAllInterfacesResponse) ProtoMessage

func (*ListAllInterfacesResponse) ProtoMessage()

func (*ListAllInterfacesResponse) Reset

func (m *ListAllInterfacesResponse) Reset()

func (*ListAllInterfacesResponse) Size

func (m *ListAllInterfacesResponse) Size() (n int)

func (*ListAllInterfacesResponse) String

func (m *ListAllInterfacesResponse) String() string

func (*ListAllInterfacesResponse) Unmarshal

func (m *ListAllInterfacesResponse) Unmarshal(dAtA []byte) error

func (*ListAllInterfacesResponse) XXX_DiscardUnknown

func (m *ListAllInterfacesResponse) XXX_DiscardUnknown()

func (*ListAllInterfacesResponse) XXX_Marshal

func (m *ListAllInterfacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListAllInterfacesResponse) XXX_Merge

func (m *ListAllInterfacesResponse) XXX_Merge(src proto.Message)

func (*ListAllInterfacesResponse) XXX_Size

func (m *ListAllInterfacesResponse) XXX_Size() int

func (*ListAllInterfacesResponse) XXX_Unmarshal

func (m *ListAllInterfacesResponse) XXX_Unmarshal(b []byte) error

type ListImplementationsRequest

type ListImplementationsRequest struct {
	// interface_name defines the interface to query the implementations for.
	InterfaceName string `protobuf:"bytes,1,opt,name=interface_name,json=interfaceName,proto3" json:"interface_name,omitempty"`
}

ListImplementationsRequest is the request type of the ListImplementations RPC.

func (*ListImplementationsRequest) Descriptor

func (*ListImplementationsRequest) Descriptor() ([]byte, []int)

func (*ListImplementationsRequest) GetInterfaceName

func (m *ListImplementationsRequest) GetInterfaceName() string

func (*ListImplementationsRequest) Marshal

func (m *ListImplementationsRequest) Marshal() (dAtA []byte, err error)

func (*ListImplementationsRequest) MarshalTo

func (m *ListImplementationsRequest) MarshalTo(dAtA []byte) (int, error)

func (*ListImplementationsRequest) MarshalToSizedBuffer

func (m *ListImplementationsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListImplementationsRequest) ProtoMessage

func (*ListImplementationsRequest) ProtoMessage()

func (*ListImplementationsRequest) Reset

func (m *ListImplementationsRequest) Reset()

func (*ListImplementationsRequest) Size

func (m *ListImplementationsRequest) Size() (n int)

func (*ListImplementationsRequest) String

func (m *ListImplementationsRequest) String() string

func (*ListImplementationsRequest) Unmarshal

func (m *ListImplementationsRequest) Unmarshal(dAtA []byte) error

func (*ListImplementationsRequest) XXX_DiscardUnknown

func (m *ListImplementationsRequest) XXX_DiscardUnknown()

func (*ListImplementationsRequest) XXX_Marshal

func (m *ListImplementationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListImplementationsRequest) XXX_Merge

func (m *ListImplementationsRequest) XXX_Merge(src proto.Message)

func (*ListImplementationsRequest) XXX_Size

func (m *ListImplementationsRequest) XXX_Size() int

func (*ListImplementationsRequest) XXX_Unmarshal

func (m *ListImplementationsRequest) XXX_Unmarshal(b []byte) error

type ListImplementationsResponse

type ListImplementationsResponse struct {
	ImplementationMessageNames []string `` /* 141-byte string literal not displayed */
}

ListImplementationsResponse is the response type of the ListImplementations RPC.

func (*ListImplementationsResponse) Descriptor

func (*ListImplementationsResponse) Descriptor() ([]byte, []int)

func (*ListImplementationsResponse) GetImplementationMessageNames

func (m *ListImplementationsResponse) GetImplementationMessageNames() []string

func (*ListImplementationsResponse) Marshal

func (m *ListImplementationsResponse) Marshal() (dAtA []byte, err error)

func (*ListImplementationsResponse) MarshalTo

func (m *ListImplementationsResponse) MarshalTo(dAtA []byte) (int, error)

func (*ListImplementationsResponse) MarshalToSizedBuffer

func (m *ListImplementationsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ListImplementationsResponse) ProtoMessage

func (*ListImplementationsResponse) ProtoMessage()

func (*ListImplementationsResponse) Reset

func (m *ListImplementationsResponse) Reset()

func (*ListImplementationsResponse) Size

func (m *ListImplementationsResponse) Size() (n int)

func (*ListImplementationsResponse) String

func (m *ListImplementationsResponse) String() string

func (*ListImplementationsResponse) Unmarshal

func (m *ListImplementationsResponse) Unmarshal(dAtA []byte) error

func (*ListImplementationsResponse) XXX_DiscardUnknown

func (m *ListImplementationsResponse) XXX_DiscardUnknown()

func (*ListImplementationsResponse) XXX_Marshal

func (m *ListImplementationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListImplementationsResponse) XXX_Merge

func (m *ListImplementationsResponse) XXX_Merge(src proto.Message)

func (*ListImplementationsResponse) XXX_Size

func (m *ListImplementationsResponse) XXX_Size() int

func (*ListImplementationsResponse) XXX_Unmarshal

func (m *ListImplementationsResponse) XXX_Unmarshal(b []byte) error

type ReflectionServiceClient

type ReflectionServiceClient interface {
	// ListAllInterfaces lists all the interfaces registered in the interface
	// registry.
	ListAllInterfaces(ctx context.Context, in *ListAllInterfacesRequest, opts ...grpc.CallOption) (*ListAllInterfacesResponse, error)
	// ListImplementations list all the concrete types that implement a given
	// interface.
	ListImplementations(ctx context.Context, in *ListImplementationsRequest, opts ...grpc.CallOption) (*ListImplementationsResponse, error)
}

ReflectionServiceClient is the client API for ReflectionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReflectionServiceClient

func NewReflectionServiceClient(cc grpc1.ClientConn) ReflectionServiceClient

type ReflectionServiceServer

type ReflectionServiceServer interface {
	// ListAllInterfaces lists all the interfaces registered in the interface
	// registry.
	ListAllInterfaces(context.Context, *ListAllInterfacesRequest) (*ListAllInterfacesResponse, error)
	// ListImplementations list all the concrete types that implement a given
	// interface.
	ListImplementations(context.Context, *ListImplementationsRequest) (*ListImplementationsResponse, error)
}

ReflectionServiceServer is the server API for ReflectionService service.

func NewReflectionServiceServer

func NewReflectionServiceServer(interfaceRegistry types.InterfaceRegistry) ReflectionServiceServer

NewReflectionServiceServer creates a new reflectionServiceServer.

type UnimplementedReflectionServiceServer

type UnimplementedReflectionServiceServer struct {
}

UnimplementedReflectionServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedReflectionServiceServer) ListAllInterfaces

func (*UnimplementedReflectionServiceServer) ListImplementations

Jump to

Keyboard shortcuts

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