grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapGRPCMetadata

func WrapGRPCMetadata(headers metadata.MD) api.HeaderMap

func WrapGRPCRequest

func WrapGRPCRequest(rawURL string, header metadata.MD, conn network.Connection) api.HTTPRequest

func WrapGRPCResponse

func WrapGRPCResponse(statusCode codes.Code, header metadata.MD, trailer metadata.MD, connection network.Connection) api.HTTPResponse

Types

type GRPCDialer

type GRPCDialer struct {
	http.MiddlewareHandler
	// contains filtered or unexported fields
}

func NewGRPCDialer

func NewGRPCDialer(caClient ca.Client, streamHandler api.StreamHandler, discoveryClient discovery.DiscoveryClient, logger logr.Logger) *GRPCDialer

func (*GRPCDialer) Dial

func (g *GRPCDialer) Dial(ctx context.Context, addr string) (net.Conn, error)

func (*GRPCDialer) GetTLSConfig

func (g *GRPCDialer) GetTLSConfig() *tls.Config

func (*GRPCDialer) RequestInterceptor

func (g *GRPCDialer) RequestInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error

type GRPCRequest

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

func (*GRPCRequest) Body

func (r *GRPCRequest) Body() io.ReadCloser

func (*GRPCRequest) Connection

func (r *GRPCRequest) Connection() network.Connection

func (*GRPCRequest) HTTPProtocol

func (r *GRPCRequest) HTTPProtocol() string

func (*GRPCRequest) Header

func (r *GRPCRequest) Header() api.HeaderMap

func (*GRPCRequest) Host

func (r *GRPCRequest) Host() string

func (*GRPCRequest) Method

func (r *GRPCRequest) Method() string

func (*GRPCRequest) SetBody

func (r *GRPCRequest) SetBody(io.ReadCloser)

func (*GRPCRequest) Trailer

func (r *GRPCRequest) Trailer() api.HeaderMap

func (*GRPCRequest) URL

func (r *GRPCRequest) URL() *url.URL

type GRPCResponse

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

func (*GRPCResponse) Body

func (r *GRPCResponse) Body() io.ReadCloser

func (*GRPCResponse) Connection

func (r *GRPCResponse) Connection() network.Connection

func (*GRPCResponse) ContentLength

func (r *GRPCResponse) ContentLength() int64

func (*GRPCResponse) Header

func (r *GRPCResponse) Header() api.HeaderMap

func (*GRPCResponse) SetBody

func (r *GRPCResponse) SetBody(io.ReadCloser)

func (*GRPCResponse) StatusCode

func (r *GRPCResponse) StatusCode() int

func (*GRPCResponse) Trailer

func (r *GRPCResponse) Trailer() api.HeaderMap

Jump to

Keyboard shortcuts

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