Lux SDKGoPackages

health

Package health

import "github.com/luxfi/sdk/health"

Functions

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.

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.

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

Client

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