Documentation ¶
Overview ¶
Package transflect contains utilities for getting FileDescriptorSet for given gRPC server address with enabled Reflection API.break
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LogAttempt = func(ctx context.Context, attempt int, err error) {}
LogAttempt is a hook for custom, possibly structured logging. It defaults to a no-op.
Functions ¶
func AnnotateHTTPRule ¶
func AnnotateHTTPRule(fd *descriptorpb.FileDescriptorProto, httpPathPrefix string)
AnnotateHTTPRule adds /api/<pkg>.<service>/<method> as HTTP URL path to methods without http option provided in proto definition.
func Base64Proto ¶
Base64Proto marshals and base64 encodes Proto message.
func GetFileDescriptorSet ¶
func GetFileDescriptorSet(ctx context.Context, addr string, httpPathPrefix string, opts ...grpc.DialOption) (*descriptorpb.FileDescriptorSet, []string, error)
GetFileDescriptorSet returns the combined FileDescriptorProtos and transitive dependencies of all services running on address. The gRPC Reflection API must be available on the given address.
Types ¶
type MutexMap ¶ added in v0.4.2
type MutexMap struct {
// contains filtered or unexported fields
}
MutexMap is map of mutexes. Access to items can be locked by name.
Click to show internal directories.
Click to hide internal directories.