client

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package client is deploy's transport to one node agent.

The package owns a single hop: turning a prepared assignment into an authenticated HTTP call against one node and decoding the typed reply. Callers may rely on Reconcile proving the endpoint's node identity against the Warden-selected node before it mutates anything, on a reply being rejected unless it echoes the requested assignment and fence and carries a valid completion timestamp, and on every response body being size-bounded so a misbehaving node cannot exhaust Core. Placement, persistence, retry, and approval policy all stay with the reconciler that calls this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client routes an assignment either to one explicit prototype agent or to the standard agent port on the Warden-advertised node address.

func NewNodeExecClient

func NewNodeExecClient(overrideURL, token string, agentPort int, httpClient *http.Client) (*Client, error)

NewNodeExecClient validates an optional fixed endpoint. An empty endpoint enables per-node address derivation for a real fleet.

func (*Client) Reconcile

func (c *Client) Reconcile(
	ctx context.Context,
	nodeID string,
	wardenAddress string,
	request *deployv1.ReconcileRequest,
) (*deployv1.ReconcileResponse, error)

Reconcile verifies the endpoint's node identity before sending a mutation.

Jump to

Keyboard shortcuts

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