Documentation ¶
Index ¶
- Constants
- Variables
- func AnyResolverFromDescriptorSource(source DescriptorSource) jsonpb.AnyResolver
- func BuildCredentialsTLS(caCerts, clientCert, clientKey, serverName string) (credentials.TransportCredentials, error)
- func GetDescriptorText(dsc desc.Descriptor, _ DescriptorSource) (string, error)
- func MetadataFromHeaders(headers []string) metadata.MD
- func NewClientGRPC(ctx context.Context, arg ClientDialOptions) (*grpc.ClientConn, error)
- func RequestParserAndFormatter(format Format, descSource DescriptorSource, in io.Reader, opts FormatOptions) (RequestParser, Formatter, error)
- type CheckerResponse
- type ClientDialOptions
- type CompositeSource
- type DefaultEventHandler
- type DescriptorSource
- type Format
- type FormatOptions
- type Formatter
- type InvokeResponse
- type RequestParser
- type RequestSupplier
Constants ¶
View Source
const ( FormatJSON = Format("json") FormatText = Format("text") )
Variables ¶
View Source
var ErrReflectionNotSupported = errors.New("server does not support the reflection API")
Functions ¶
func AnyResolverFromDescriptorSource ¶
func AnyResolverFromDescriptorSource(source DescriptorSource) jsonpb.AnyResolver
func BuildCredentialsTLS ¶ added in v1.0.12
func BuildCredentialsTLS(caCerts, clientCert, clientKey, serverName string) (credentials.TransportCredentials, error)
func GetDescriptorText ¶
func GetDescriptorText(dsc desc.Descriptor, _ DescriptorSource) (string, error)
func MetadataFromHeaders ¶
func NewClientGRPC ¶ added in v1.0.12
func NewClientGRPC(ctx context.Context, arg ClientDialOptions) (*grpc.ClientConn, error)
func RequestParserAndFormatter ¶
func RequestParserAndFormatter(format Format, descSource DescriptorSource, in io.Reader, opts FormatOptions) (RequestParser, Formatter, error)
Types ¶
type CheckerResponse ¶
type ClientDialOptions ¶ added in v1.0.12
type CompositeSource ¶
type CompositeSource struct { Reflection DescriptorSource File DescriptorSource }
func (CompositeSource) AllExtensionsForType ¶
func (cs CompositeSource) AllExtensionsForType(typeName string) ([]*desc.FieldDescriptor, error)
func (CompositeSource) FindSymbol ¶
func (cs CompositeSource) FindSymbol(fullyQualifiedName string) (desc.Descriptor, error)
func (CompositeSource) ListServices ¶
func (cs CompositeSource) ListServices() ([]string, error)
type DefaultEventHandler ¶
type DescriptorSource ¶
type DescriptorSource interface { ListServices() ([]string, error) FindSymbol(fullyQualifiedName string) (desc.Descriptor, error) AllExtensionsForType(typeName string) ([]*desc.FieldDescriptor, error) }
func DescriptorSourceFromFileDescriptors ¶
func DescriptorSourceFromFileDescriptors(files ...*desc.FileDescriptor) (DescriptorSource, error)
func DescriptorSourceFromProtoFileContent ¶
func DescriptorSourceFromProtoFileContent(fileContent string) (DescriptorSource, error)
func DescriptorSourceFromServer ¶
func DescriptorSourceFromServer(_ context.Context, refClient *grpcreflect.Client) DescriptorSource
type FormatOptions ¶
type Formatter ¶
func NewJSONFormatter ¶
func NewJSONFormatter(emitDefaults bool, resolver jsonpb.AnyResolver) Formatter
func NewTextFormatter ¶
type InvokeResponse ¶
type InvokeResponse struct { Status string MessageRPC string Error error ResolveTs float64 ConnectTs float64 RespTrailers metadata.MD }
func DynamicInvokeRPC ¶ added in v1.0.12
func DynamicInvokeRPC(ctx context.Context, source DescriptorSource, ch grpcdynamic.Channel, methodName string, headers []string, handler *DefaultEventHandler, requestData RequestSupplier) InvokeResponse
type RequestParser ¶
func NewJSONRequestParserWithUnmarshaler ¶
func NewJSONRequestParserWithUnmarshaler(in io.Reader, unmarshaler jsonpb.Unmarshaler) RequestParser
func NewTextRequestParser ¶
func NewTextRequestParser(in io.Reader) RequestParser
type RequestSupplier ¶
Click to show internal directories.
Click to hide internal directories.