client

package
v0.0.0-...-9162fdb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: GPL-2.0 Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient[C any](fromName, toName string, fn func(string, ...client.Option) (C, error), opts ...client.Option) C

Types

type Instance

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

func (*Instance) Address

func (i *Instance) Address() net.Addr

func (*Instance) Tag

func (i *Instance) Tag(_ string) (value string, exist bool)

func (*Instance) Weight

func (i *Instance) Weight() int

type LoadBalancer

type LoadBalancer struct {
	ServiceName string
}

func (*LoadBalancer) GetPicker

func (b *LoadBalancer) GetPicker(result discovery.Result) loadbalance.Picker

func (*LoadBalancer) Name

func (b *LoadBalancer) Name() string

type Picker

type Picker struct {
	ServiceName string
	Instances   []discovery.Instance
}

func (*Picker) Next

func (p *Picker) Next(ctx context.Context, _ interface{}) discovery.Instance

Jump to

Keyboard shortcuts

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