endpoint

package
v3.37.3-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	Info

	String() string
	Copy() Endpoint
	Touch(opts ...Option)
}

func New

func New(address string, opts ...Option) Endpoint

type Info added in v3.16.10

type Info interface {
	NodeID() uint32
	Address() string
	LocalDC() bool
	Location() string
	LastUpdated() time.Time
	LoadFactor() float32
}

type Option added in v3.25.0

type Option func(e *endpoint)

func WithID

func WithID(id uint32) Option

func WithLoadFactor

func WithLoadFactor(loadFactor float32) Option

func WithLocalDC

func WithLocalDC(local bool) Option

func WithLocation added in v3.6.2

func WithLocation(location string) Option

func WithServices added in v3.10.0

func WithServices(services []string) Option

Jump to

Keyboard shortcuts

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