Documentation
¶
Overview ¶
Package networks is the resource module for vxcli's network-diagnostic scripts (DNS, bandwidth, port checks, security audits).
Two execution modes:
- Local: caller supplies (or fetches) the script and runs it on the user's host. SDK consumers do this themselves; this package only surfaces the catalog.
- Remote: ships the script to a remote VM via the install.script flow. The SDK delegates to /api/v2/tenant/install/script under the hood, so all the same auth/SSH machinery applies.
vxcli embeds the script catalog in its binary; the SDK does NOT. Callers either supply the script bytes or fetch the catalog from the /api/v2/tenant/networks/scripts endpoint (planned in BIG_PLAN M3).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the entry point. Construct via the parent SDK client:
c.Networks()
func (*Client) List ¶
func (c *Client) List(ctx context.Context) ([]ScriptCatalogEntry, error)
List returns the catalog of available network-diagnostic scripts. Falls back to an empty list if the server doesn't yet expose the catalog endpoint (vxcli embeds it client-side today).
type RunRemoteOpts ¶
type RunRemoteOpts struct {
SSH SSH
// Script bytes (e.g. an embedded catalog entry from the caller).
Script []byte
// ScriptName as it appears on the remote host.
ScriptName string
// Args appended to the script invocation (NUL-separated server-side).
Args []string
}
RunRemoteOpts ships an arbitrary network-diagnostic script to a remote VM via the install.script flow.
type SSH ¶
type SSH struct {
Host string
User string
KeyPairName string
WorkspaceUser string
Organization string
}
SSH is the common SSH target shared with install/services/deploy.
type ScriptCatalogEntry ¶
type ScriptCatalogEntry struct {
Name string `json:"name"`
FileName string `json:"file_name"`
Description string `json:"description"`
Aliases []string `json:"aliases,omitempty"`
}
ScriptCatalogEntry is one row in the embedded networks-script catalog. Returned by List once the server endpoint lands; today this is empty unless the operator has populated /api/v2/tenant/networks/scripts.