hubclient

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunHeartbeatLoop

func RunHeartbeatLoop(ctx context.Context, c *Client, deploymentID string, interval time.Duration, versionFn func() int64, build string, onErr func(error))

RunHeartbeatLoop sends heartbeats until ctx is cancelled.

Types

type Client

type Client struct {
	BaseURL    string
	JoinToken  string
	HTTPClient *http.Client
}

Client talks to the hub control plane for spoke operations.

func New

func New(baseURL, joinToken string) *Client

func (*Client) Heartbeat

func (c *Client) Heartbeat(ctx context.Context, deploymentID string, snapVersion int64, build string) error

Heartbeat reports snapshot version for a deployment.

func (*Client) ShipUsage

func (c *Client) ShipUsage(ctx context.Context, deploymentID string, payload []byte) error

ShipUsage posts a usage outbox payload to the hub.

Jump to

Keyboard shortcuts

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