grpc

package
v0.0.0-...-f59cc51 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetGlobalBalancer

func SetGlobalBalancer(scheme string, selector selector.Selector)

SetGlobalBalancer set grpc balancer with scheme.

Types

type Builder

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

Builder is grpc balancer builder.

func (*Builder) Build

func (b *Builder) Build(info base.PickerBuildInfo) gBalancer.Picker

Build creates a grpc Picker.

type GofBuilder

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

func (*GofBuilder) Build

type GofPicker

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

func (*GofPicker) Pick

type GofTrailer

type GofTrailer metadata.MD

func (GofTrailer) Get

func (g GofTrailer) Get(key string) string

type GrpcServer

type GrpcServer struct {
	*grpc.Server
	// contains filtered or unexported fields
}

func NewGrpcServer

func NewGrpcServer(addr string, mid ...grpc.UnaryServerInterceptor) *GrpcServer

func (*GrpcServer) Endpoint

func (g *GrpcServer) Endpoint() (*url.URL, error)

Endpoint return a real address to registry endpoint. examples:

grpc://127.0.0.1:9000?isSecure=false

func (*GrpcServer) Start

func (g *GrpcServer) Start(context.Context) error

func (*GrpcServer) Stop

func (g *GrpcServer) Stop(context.Context) error

type Picker

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

Picker is a grpc picker.

func (*Picker) Pick

Pick pick instances.

type Trailer

type Trailer metadata.MD

Trailer is a grpc trailder MD.

func (Trailer) Get

func (t Trailer) Get(k string) string

Get get a grpc trailer value.

type Transport

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

Transport is a gRPC transport.

func (*Transport) Endpoint

func (tr *Transport) Endpoint() string

Endpoint returns the transport endpoint.

func (*Transport) Kind

func (tr *Transport) Kind() server.Kind

Kind returns the transport kind.

func (*Transport) Operation

func (tr *Transport) Operation() string

Operation returns the transport operation.

func (*Transport) ReplyHeader

func (tr *Transport) ReplyHeader() server.Header

ReplyHeader returns the reply header.

func (*Transport) RequestHeader

func (tr *Transport) RequestHeader() server.Header

RequestHeader returns the request header.

Jump to

Keyboard shortcuts

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