zk

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

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultVotingConfigExclusionsTimeout is the default timeout for setting voting exclusions.
	DefaultVotingConfigExclusionsTimeout = "30s"
	// DefaultReqTimeout is the default timeout used when performing HTTP calls against Elasticsearch
	DefaultReqTimeout = 3 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseClient

type BaseClient struct {
	Endpoints []string
	HTTP      *http.Client
	Endpoint  string
	Transport *http.Transport
}

func (*BaseClient) Close

func (c *BaseClient) Close()

func (*BaseClient) Equal

func (c *BaseClient) Equal(c2 *BaseClient) bool

func (*BaseClient) Get

func (c *BaseClient) Get(ctx context.Context, pathWithQuery string, out interface{}) error

func (*BaseClient) GetClusterStatus

func (c *BaseClient) GetClusterStatus(ctx context.Context) (ServerStats, error)

func (*BaseClient) GetClusterUp

func (c *BaseClient) GetClusterUp(ctx context.Context) (bool, error)

func (*BaseClient) IsAlive

func (c *BaseClient) IsAlive(c2 *BaseClient) bool

func (*BaseClient) Post

func (c *BaseClient) Post(ctx context.Context, pathWithQuery string, in, out interface{}) error

type ClusterStats

type ClusterStats struct {
	AvailableNodes int
	LeaderNode     string
}

type Mode

type Mode uint8

Mode is used to build custom server modes (leader|follower|standalone).

type ServerStats

type ServerStats struct {
	Sent        int64
	Received    int64
	NodeCount   int64
	MinLatency  int64
	AvgLatency  int64
	MaxLatency  int64
	Connections int64
	Outstanding int64
	Epoch       int32
	Counter     int32
	BuildTime   time.Time
	Mode        Mode
	Version     string
	Error       error
}

ServerStats is the information pulled from the Zookeeper `stat` command.

Jump to

Keyboard shortcuts

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