selector

package
v0.0.0-...-9fce2f1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoVersion = errors.New("no such version")
	ErrNoLabel   = errors.New("no such label")
	ErrNoNodes   = errors.New("no nodes found")
)

Functions

This section is empty.

Types

type Next

type Next func() (*Node, error)

type Node

type Node struct {
	Addr  string
	Label string
}

type Option

type Option func(*Options)

func Version

func Version(v string) Option

type Options

type Options struct {
	Version string
	Label   string
}

type Selector

type Selector interface {
	Add(*Node, ...Option) error
	Remove(*Node, ...Option) error
	List(...Option) ([]*Node, error)
	Select(string, ...Option) (Next, error)
	Mark(*Node, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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