remotes

package
v0.0.0-...-bec6d6f Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachePutter

type CachePutter interface {
	PutResult(packet.QuestionFormat, *packet.ParsedPacket) error
}

type MotivatedTarget

type MotivatedTarget interface {
	Target
	Motivation(packet.QuestionFormat) uint8
}

type Pool

type Pool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewPool

func NewPool(ctx context.Context) *Pool

func (*Pool) Add

func (p *Pool) Add(addr string) error

Add adds a new remote to the pool.

func (*Pool) Len

func (p *Pool) Len() int

Len returns the number of configured remotes.

func (*Pool) Query

type Target

type Target interface {
	Query(context.Context, packet.ParsedPacket) (*packet.ParsedPacket, error)
	Healthy(context.Context) bool
	String() string
}

Jump to

Keyboard shortcuts

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