atcclient

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryInterval = 30 * time.Second
	LoadInterval  = 30 * time.Second
)

Variables

This section is empty.

Functions

func AddLoad

func AddLoad(value float32)

func SubLoad

func SubLoad(value float32)

Types

type ATCClient

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

func New

func New(cc *grpc.ClientConn, tlsConfig *tls.Config) (*ATCClient, error)

func (*ATCClient) ClientAssign

func (c *ATCClient) ClientAssign(ctx context.Context, req *roxypb.ClientAssignRequest) (chan []*roxypb.Event, chan error, error)

func (*ATCClient) Close

func (c *ATCClient) Close() error

func (*ATCClient) Dial

func (*ATCClient) Find

func (c *ATCClient) Find(ctx context.Context, serviceName string, shardID uint32, useCache bool) (*net.TCPAddr, error)

func (*ATCClient) Lookup

func (c *ATCClient) Lookup(ctx context.Context, serviceName string) (*roxypb.LookupResponse, error)

func (*ATCClient) ServerAnnounce

func (c *ATCClient) ServerAnnounce(ctx context.Context, req *roxypb.ServerAnnounceRequest, loadFn LoadFunc) (context.CancelFunc, chan error, error)

type LoadFunc

type LoadFunc func() float32
var DefaultLoadFunc LoadFunc = defaultLoadFunc

Jump to

Keyboard shortcuts

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