Versions in this module Expand all Collapse all v1 v1.4.1 Aug 26, 2020 v1.4.0 Sep 9, 2019 Changes in this version + const FormatJSON + const FormatText + var ErrReflectionNotSupported = errors.New("server does not support the reflection API") + func AnyResolverFromDescriptorSource(source DescriptorSource) jsonpb.AnyResolver + func AnyResolverFromDescriptorSourceWithFallback(source DescriptorSource) jsonpb.AnyResolver + func BlockingDial(ctx context.Context, network, address string, ...) (*grpc.ClientConn, error) + func ClientTransportCredentials(insecureSkipVerify bool, cacertFile, clientCertFile, clientKeyFile string) (credentials.TransportCredentials, error) + func EnsureExtensions(source DescriptorSource, msg proto.Message) proto.Message + func GetAllFiles(source DescriptorSource) ([]*desc.FileDescriptor, error) + func GetDescriptorText(dsc desc.Descriptor, _ DescriptorSource) (string, error) + func InvokeRPC(ctx context.Context, source DescriptorSource, ch grpcdynamic.Channel, ...) error + func InvokeRpc(ctx context.Context, source DescriptorSource, cc *grpc.ClientConn, ...) error + func ListMethods(source DescriptorSource, serviceName string) ([]string, error) + func ListServices(source DescriptorSource) ([]string, error) + func MakeTemplate(md *desc.MessageDescriptor) proto.Message + func MetadataFromHeaders(headers []string) metadata.MD + func MetadataToString(md metadata.MD) string + func PrintStatus(w io.Writer, stat *status.Status, formatter Formatter) + func RequestParserAndFormatterFor(format Format, descSource DescriptorSource, ...) (RequestParser, Formatter, error) + func ServerTransportCredentials(cacertFile, serverCertFile, serverKeyFile string, requireClientCerts bool) (credentials.TransportCredentials, error) + type DefaultEventHandler struct + NumResponses int + Status *status.Status + func NewDefaultEventHandler(out io.Writer, descSource DescriptorSource, formatter Formatter, verbose bool) *DefaultEventHandler + func (h *DefaultEventHandler) OnReceiveHeaders(md metadata.MD) + func (h *DefaultEventHandler) OnReceiveResponse(resp proto.Message) + func (h *DefaultEventHandler) OnReceiveTrailers(stat *status.Status, md metadata.MD) + func (h *DefaultEventHandler) OnResolveMethod(md *desc.MethodDescriptor) + func (h *DefaultEventHandler) OnSendHeaders(md metadata.MD) + type DescriptorSource interface + AllExtensionsForType func(typeName string) ([]*desc.FieldDescriptor, error) + FindSymbol func(fullyQualifiedName string) (desc.Descriptor, error) + ListServices func() ([]string, error) + func DescriptorSourceFromFileDescriptorSet(files *descpb.FileDescriptorSet) (DescriptorSource, error) + func DescriptorSourceFromFileDescriptors(files ...*desc.FileDescriptor) (DescriptorSource, error) + func DescriptorSourceFromProtoFiles(importPaths []string, fileNames ...string) (DescriptorSource, error) + func DescriptorSourceFromProtoSets(fileNames ...string) (DescriptorSource, error) + func DescriptorSourceFromServer(_ context.Context, refClient *grpcreflect.Client) DescriptorSource + type Format string + type Formatter func(proto.Message) (string, error) + func NewJSONFormatter(emitDefaults bool, resolver jsonpb.AnyResolver) Formatter + func NewTextFormatter(includeSeparator bool) Formatter + type InvocationEventHandler interface + OnReceiveHeaders func(metadata.MD) + OnReceiveResponse func(proto.Message) + OnReceiveTrailers func(*status.Status, metadata.MD) + OnResolveMethod func(*desc.MethodDescriptor) + OnSendHeaders func(metadata.MD) + type RequestMessageSupplier func() ([]byte, error) + type RequestParser interface + Next func(msg proto.Message) error + NumRequests func() int + func NewJSONRequestParser(in io.Reader, resolver jsonpb.AnyResolver) RequestParser + func NewTextRequestParser(in io.Reader) RequestParser + type RequestSupplier func(proto.Message) error