transflect

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

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 HTTPAnnotationPrefix = "/api"

HTTPAnnotationPrefix url path prefix to use for missing HTTPRule.

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)

AnnotateHTTPRule adds /api/<pkg>.<service>/<method> as HTTP URL path to methods without http option provided in proto definition.

func Base64Proto

func Base64Proto(m proto.Message) (string, error)

Base64Proto marshals and base64 encodes Proto message.

func GetFileDescriptorSet

func GetFileDescriptorSet(ctx context.Context, addr 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

This section is empty.

Jump to

Keyboard shortcuts

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