grpcclient

package
v0.0.0-...-d3dbaab Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BalancerName = "p2c_ewma"
)

Variables

This section is empty.

Functions

func Now

func Now() time.Duration

Types

type Client

type Client struct {
	*grpc.ClientConn
	Addr     string
	DialOpts []grpc.DialOption
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts ...Option) (*Client, error)

func (*Client) Close

func (c *Client) Close()

type Option

type Option func(c *Client)

func WithAddr

func WithAddr(addr string) Option

func WithBalancingPolicy

func WithBalancingPolicy(policy string) Option

func WithBlock

func WithBlock() Option

func WithDefault

func WithDefault() Option

func WithDialOpts

func WithDialOpts(opts ...grpc.DialOption) Option

func WithInsecure

func WithInsecure() Option

func WithRateLimiter

func WithRateLimiter(limit float64, burst int) Option

type Resolver

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

func NewResolver

func NewResolver(cc resolver.ClientConn, serviceName string, discovery discover.Discovery) *Resolver

func (*Resolver) Close

func (r *Resolver) Close()

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(opt resolver.ResolveNowOptions)

func (*Resolver) Start

func (r *Resolver) Start()

Jump to

Keyboard shortcuts

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