health

package
v1.16.49 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitAlive

func AwaitAlive(ctx context.Context, c *Client, freq time.Duration, tags []string, options ...rpc.Option) (bool, error)

AwaitAlive polls the node every [freq] until the node reports liveness. Only returns an error if [ctx] returns an error.

func AwaitHealthy

func AwaitHealthy(ctx context.Context, c *Client, freq time.Duration, tags []string, options ...rpc.Option) (bool, error)

AwaitHealthy polls the node every [freq] until the node reports healthy. Only returns an error if [ctx] returns an error.

func AwaitReady

func AwaitReady(ctx context.Context, c *Client, freq time.Duration, tags []string, options ...rpc.Option) (bool, error)

AwaitReady polls the node every [freq] until the node reports ready. Only returns an error if [ctx] returns an error.

Types

type Client

type Client struct {
	Requester rpc.EndpointRequester
}

func NewClient

func NewClient(uri string) *Client

func (*Client) Health

func (c *Client) Health(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error)

Health returns a summation of the health of the node

func (*Client) Liveness

func (c *Client) Liveness(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error)

Liveness returns if the node is in need of a restart

func (*Client) Readiness

func (c *Client) Readiness(ctx context.Context, tags []string, options ...rpc.Option) (*apihealth.APIReply, error)

Readiness returns if the node has finished initialization

Jump to

Keyboard shortcuts

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