client

package
v0.0.0-...-b7f82e1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Passing     selectors.HealthStatus = "passing"
	Warning     selectors.HealthStatus = "warning"
	Critical    selectors.HealthStatus = "critical"
	Maintenance selectors.HealthStatus = "maintenance"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Lock(selectors.Namespace) (selectors.SemaphoreUnlock, error)
	Heartbeat(selectors.HealthStatus) error
	List(fs.Prefix) (map[string]int, error)
}

func NewClient

func NewClient(address, checkId, output string) Client

type ClientCreator

type ClientCreator func(string, string, string) Client

type KeyValueStoreElement

type KeyValueStoreElement struct {
	Key  string `json:"key"`
	Node int    `json:"node"`
}

type Pool

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

func (*Pool) Get

func (p *Pool) Get() (Client, error)

func (*Pool) Put

func (p *Pool) Put(client Client)

type Pools

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

func New

func New(address, checkId, output string,
	maxPoolSize int,
	creator ClientCreator,
) *Pools

func (Pools) With

func (p Pools) With(fn func(Client) error) error

Jump to

Keyboard shortcuts

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