proxy

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntrospectionResponse

type IntrospectionResponse struct {
	Services []*serviceElement `json:"services"`
	Types    []*typeElement    `json:"types"`
}

IntrospectionResponse represents a introspection response

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Proxy performs upstream invocation as a dynamic gRPC client using reflection

func NewProxy

func NewProxy(conn *grpc.ClientConn) *Proxy

NewProxy creates a new gRPC client

func (*Proxy) Introspect

func (p *Proxy) Introspect() ([]byte, error)

Introspect performs instrospection on this gRPC server, and obtains all services and methods information

func (*Proxy) Invoke

func (p *Proxy) Invoke(ctx context.Context,
	serviceName, methodName string,
	message []byte,
	md *metadata.Metadata,
) ([]byte, error)

Invoke performs the gRPC call after doing reflection to obtain type information

func (*Proxy) IsReady

func (p *Proxy) IsReady() bool

IsReady checks the connectivity to the upstream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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