grpcreflection

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Overview

Package grpcreflection provides gRPC reflection client. Currently, gRPC reflection depends on Protocol Buffers, so we split this package from grpc package.

Index

Constants

View Source
const ServiceName = "grpc.reflection.v1alpha.ServerReflection"

ServiceName represents the gRPC reflection service name.

Variables

View Source
var ErrTLSHandshakeFailed = errors.New("TLS handshake failed")

Functions

This section is empty.

Types

type Client

type Client interface {
	// ListPackages lists file descriptors from the gRPC reflection server.
	// ListPackages returns these errors:
	//   - ErrTLSHandshakeFailed: TLS misconfig.
	ListPackages() ([]*desc.FileDescriptor, error)
	// Reset clears internal states of Client.
	Reset()
}

Client defines gRPC reflection client.

func NewClient

func NewClient(conn grpc.ClientConnInterface, headers map[string][]string) Client

NewClient returns an instance of gRPC reflection client for gRPC protocol.

func NewWebClient

func NewWebClient(conn *grpcweb.ClientConn, headers map[string][]string) Client

NewWebClient returns an instance of gRPC reflection client for gRPC-Web protocol.

Jump to

Keyboard shortcuts

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