nvfleetint

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 21 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nvfleetint provides a Go SDK for the Fleet Intelligence customer API.

Index

Constants

View Source
const (
	AlertSeverityCritical AlertSeverity = "Critical"
	AlertSeverityWarning  AlertSeverity = "Warning"

	AlertStateDetected  AlertState = "Detected"
	AlertStateTriggered AlertState = "Triggered"
	AlertStateResolved  AlertState = "Resolved"

	AlertTimelineStateCritical AlertTimelineState = "Critical"
	AlertTimelineStateWarning  AlertTimelineState = "Warning"
	AlertTimelineStateResolved AlertTimelineState = "Resolved"

	AlertTimelineNodeSortByHostname    AlertTimelineNodeSortBy = "hostname"
	AlertTimelineNodeSortByAlert       AlertTimelineNodeSortBy = "alert"
	AlertTimelineNodeSortByGPUType     AlertTimelineNodeSortBy = "gpuType"
	AlertTimelineNodeSortByNodeGroup   AlertTimelineNodeSortBy = "nodeGroup"
	AlertTimelineNodeSortByComputeZone AlertTimelineNodeSortBy = "computeZone"
	AlertTimelineNodeSortByLastUpdate  AlertTimelineNodeSortBy = "lastUpdate"

	AlertTimelineAlertSortByStartTime  AlertTimelineAlertSortBy = "startTime"
	AlertTimelineAlertSortByLastUpdate AlertTimelineAlertSortBy = "lastUpdate"

	AlertTimelineOrderAsc  AlertTimelineSortOrder = "asc"
	AlertTimelineOrderDesc AlertTimelineSortOrder = "desc"
)
View Source
const (
	NodeViewDetail NodeView = "detail"
	NodeViewBasic  NodeView = "basic"

	NodeAgentTypeInband NodeAgentType = "inband"
	NodeAgentTypeOOB    NodeAgentType = "oob"

	NodeHealthHealthy   NodeHealthStatus = "Healthy"
	NodeHealthDegraded  NodeHealthStatus = "Degraded"
	NodeHealthUnhealthy NodeHealthStatus = "Unhealthy"
	NodeHealthUnknown   NodeHealthStatus = "Unknown"

	NodeVerificationVerified    NodeVerificationCheck = "Verified"
	NodeVerificationUnverified  NodeVerificationCheck = "Unverified"
	NodeVerificationDegraded    NodeVerificationCheck = "Degraded"
	NodeVerificationPending     NodeVerificationCheck = "Pending"
	NodeVerificationUnsupported NodeVerificationCheck = "Unsupported"
	NodeVerificationUnknown     NodeVerificationCheck = "Unknown"
	// Deprecated: use NodeVerificationVerified
	NodeVerificationPassed NodeVerificationCheck = NodeVerificationVerified
	// Deprecated: use NodeVerificationUnverified
	NodeVerificationFailed NodeVerificationCheck = NodeVerificationUnverified

	NodeFirmwarePassed  NodeFirmwareCheck = "Passed"
	NodeFirmwareFailed  NodeFirmwareCheck = "Failed"
	NodeFirmwareUnknown NodeFirmwareCheck = "Unknown"

	NodeAgentOnline  NodeAgentStatus = "Online"
	NodeAgentOffline NodeAgentStatus = "Offline"
	NodeAgentUnknown NodeAgentStatus = "Unknown"

	NodeSortByHostname            NodeSortBy = "hostname"
	NodeSortByUUID                NodeSortBy = "nodeUUID"
	NodeSortByHealthStatus        NodeSortBy = "healthStatus"
	NodeSortByNodeGroup           NodeSortBy = "nodegroup"
	NodeSortByComputeZone         NodeSortBy = "computezone"
	NodeSortByGPUType             NodeSortBy = "gpuType"
	NodeSortByGPUCount            NodeSortBy = "gpuCount"
	NodeSortByVerificationCheck   NodeSortBy = "verificationCheck"
	NodeSortByAgentStatus         NodeSortBy = "agentStatus"
	NodeSortByAgentVersion        NodeSortBy = "agentVersion"
	NodeSortByKernelVersion       NodeSortBy = "kernelVersion"
	NodeSortByGPUDriverVersion    NodeSortBy = "gpuDriverVersion"
	NodeSortByGPUFirmwareVersions NodeSortBy = "gpuFirmwareVersions"
	NodeSortByNodeName            NodeSortBy = "nodeName"
	NodeSortByBMCHostname         NodeSortBy = "bmcHostname"

	NodeOrderAsc  NodeSortOrder = "asc"
	NodeOrderDesc NodeSortOrder = "desc"
)
View Source
const (
	NodeGroupViewDetail NodeGroupView = "detail"
	NodeGroupViewBasic  NodeGroupView = "basic"

	NodeGroupHealthHealthy   NodeGroupHealthStatus = "Healthy"
	NodeGroupHealthDegraded  NodeGroupHealthStatus = "Degraded"
	NodeGroupHealthUnhealthy NodeGroupHealthStatus = "Unhealthy"
	NodeGroupHealthUnknown   NodeGroupHealthStatus = "Unknown"

	NodeGroupSortByHealth NodeGroupSortBy = "health"
	NodeGroupSortByNodes  NodeGroupSortBy = "nodes"

	NodeGroupOrderAsc  NodeGroupSortOrder = "asc"
	NodeGroupOrderDesc NodeGroupSortOrder = "desc"
)
View Source
const (
	ReportFormatJSON ReportFormat = "json"
	ReportFormatCSV  ReportFormat = "csv"

	ErrorReportViewList     ErrorReportView = "list"
	ErrorReportViewGraph    ErrorReportView = "graph"
	ErrorReportViewOverview ErrorReportView = "overview"

	ErrorReportGroupByError ErrorReportGroupBy = "error"
	ErrorReportGroupByNode  ErrorReportGroupBy = "node"

	ErrorReportTimeModeAbsolute ErrorReportTimeMode = "absolute"
	ErrorReportTimeModeRelative ErrorReportTimeMode = "relative"

	ErrorSeverityCritical ErrorSeverity = "Critical"
	ErrorSeverityFatal    ErrorSeverity = "Fatal"
	ErrorSeverityInfo     ErrorSeverity = "Info"
	ErrorSeverityWarning  ErrorSeverity = "Warning"

	InventoryReportSortByHostname          InventoryReportSortBy = "hostname"
	InventoryReportSortByNodeUUID          InventoryReportSortBy = "nodeUUID"
	InventoryReportSortByNodeGroup         InventoryReportSortBy = "nodeGroup"
	InventoryReportSortByComputeZone       InventoryReportSortBy = "computeZone"
	InventoryReportSortByGPUType           InventoryReportSortBy = "gpuType"
	InventoryReportSortByGPUCount          InventoryReportSortBy = "gpuCount"
	InventoryReportSortByPublicIP          InventoryReportSortBy = "publicIP"
	InventoryReportSortByPrivateIP         InventoryReportSortBy = "privateIP"
	InventoryReportSortByVerificationCheck InventoryReportSortBy = "verificationCheck"
	InventoryReportSortByLocation          InventoryReportSortBy = "location"

	InventoryReportOrderAsc  InventoryReportSortOrder = "asc"
	InventoryReportOrderDesc InventoryReportSortOrder = "desc"
)
View Source
const (
	XIDBurstSortByJobDisruption                   XIDBurstSortBy = "jobDisruption"
	XIDBurstSortByJobDisruptionDueToPlatformIssue XIDBurstSortBy = "jobDisruptionDueToPlatformIssue"
	XIDBurstSortByCategory                        XIDBurstSortBy = "category"
	XIDBurstSortBySubcategory                     XIDBurstSortBy = "subcategory"
	XIDBurstSortByXIDNumbers                      XIDBurstSortBy = "xidNumbers"
	XIDBurstSortByXIDCount                        XIDBurstSortBy = "xidCount"
	XIDBurstSortByBurstDuration                   XIDBurstSortBy = "burstDurationSeconds"
	// XIDBurstSortByNodeUUID spells the value "nodeUuid" to match the API contract,
	// which differs from the nodeUUID casing used elsewhere in the spec.
	XIDBurstSortByNodeUUID             XIDBurstSortBy = "nodeUuid"
	XIDBurstSortByHostname             XIDBurstSortBy = "hostname"
	XIDBurstSortByNodeGroup            XIDBurstSortBy = "nodeGroup"
	XIDBurstSortByComputeZone          XIDBurstSortBy = "computeZone"
	XIDBurstSortByStartTime            XIDBurstSortBy = "startTime"
	XIDBurstSortByDCAdminAction        XIDBurstSortBy = "dcAdminAction"
	XIDBurstSortByDCAdminInvestigation XIDBurstSortBy = "dcAdminInvestigation"
	XIDBurstSortByTenantAction         XIDBurstSortBy = "tenantAction"
	XIDBurstSortByTenantInvestigation  XIDBurstSortBy = "tenantInvestigation"

	XIDBurstOrderAsc  XIDBurstSortOrder = "asc"
	XIDBurstOrderDesc XIDBurstSortOrder = "desc"
)
View Source
const (
	ActionPersonaTenant  = "tenant"
	ActionPersonaDCAdmin = "dc_admin"
)

Personas a suggested action can target. The API omits the persona when it has already reduced actions to one, which for a tenant key means tenant.

View Source
const (
	ActionTypeImmediate     = "immediate"
	ActionTypeInvestigatory = "investigatory"
)

Types a suggested action can carry.

View Source
const DefaultTimeout = 2 * time.Minute

DefaultTimeout is the per-request timeout applied when none is configured.

View Source
const DurationUnitsMessage = "expected a positive duration using units ns, us, µs, ms, s, m, or h"

DurationUnitsMessage states the duration syntax the API accepts. It is the second half of every message ValidateWindow and ValidateStep return, so a front end that re-words the rule states the units the same way the SDK does.

View Source
const MaxEventBuckets = 1000

MaxEventBuckets is the largest number of histogram buckets the events buckets endpoint accepts.

View Source
const MaxTagLength = 50

MaxTagLength is the longest a single tag may be. It restates the backend's own limit so an over-long tag is named locally rather than returned as an opaque 400.

Variables

View Source
var (
	ErrMissingBaseURL = errors.New("base URL is required")
	ErrMissingAPIKey  = errors.New("API key is required")
)
View Source
var ErrInsecureBaseURL = errors.New("insecure base URL: https is required")

ErrInsecureBaseURL indicates the base URL would send the API key over an unencrypted connection. Plain http is accepted only for loopback hosts.

View Source
var ErrResponseTooLarge = errors.New("API response exceeded the maximum allowed size")

ErrResponseTooLarge reports that an API response outgrew the size the SDK is willing to buffer and was refused before being parsed.

Functions

func ValidateBaseURL

func ValidateBaseURL(rawURL string) error

ValidateBaseURL reports whether rawURL is usable as a Fleet Intelligence API root. It must be an absolute https URL, except that plain http is permitted for loopback hosts (127.0.0.0/8, ::1, localhost) so local mock servers and tests keep working without exposing credentials off the machine.

func ValidateStep added in v1.1.0

func ValidateStep(step string) error

ValidateStep reports whether step is a graph bucket width the API accepts: a positive duration of at least one minute.

func ValidateWindow added in v1.1.0

func ValidateWindow(window string) error

ValidateWindow reports whether window is a positive Go duration in the units the relative-time endpoints accept. The events, error report, and XID burst endpoints all take the same window, so the rule lives here once.

Types

type APIError

type APIError struct {
	StatusCode int
	Status     string
	Message    string
	Details    string
}

Represents a non-success API response

func (*APIError) Error

func (e *APIError) Error() string

Formats API failures with status and response details

type Alert

type Alert struct {
	UUID                 string `json:"alertUUID"`
	NodeUUID             string `json:"nodeUUID,omitempty"`
	Component            string `json:"component,omitempty"`
	ComponentDisplayName string `json:"componentDisplayName,omitempty"`
	Severity             string `json:"severity,omitempty"`
	State                string `json:"state,omitempty"`
	Message              string `json:"message,omitempty"`
	Error                string `json:"error,omitempty"`
	DetectedAt           string `json:"detectedAt,omitempty"`
	TriggeredAt          string `json:"triggeredAt,omitempty"`
	EventTimestamp       string `json:"eventTimestamp,omitempty"`
	LastUpdated          string `json:"lastUpdated,omitempty"`
	FiredAt              string `json:"firedAt,omitempty"`
}

Represents an alert

type AlertSeverity

type AlertSeverity string

Represents supported alert severity filters

func (AlertSeverity) Valid

func (severity AlertSeverity) Valid() bool

Reports whether the alert severity is accepted by the API

type AlertState

type AlertState string

Represents supported alert state filters

func (AlertState) Valid

func (state AlertState) Valid() bool

Reports whether the alert state is accepted by the API

type AlertTimelineAlertSortBy

type AlertTimelineAlertSortBy string

Represents supported sort fields for alerts within one node

func (AlertTimelineAlertSortBy) Valid

func (sortBy AlertTimelineAlertSortBy) Valid() bool

Reports whether the alert sort field is accepted by the API

type AlertTimelineDetails

type AlertTimelineDetails struct {
	AlertUUID            string               `json:"alertUuid"`
	NodeUUID             string               `json:"nodeUuid,omitempty"`
	Component            string               `json:"component,omitempty"`
	ComponentDisplayName string               `json:"componentDisplayName,omitempty"`
	AlertStatus          string               `json:"alertStatus,omitempty"`
	NodeGroup            string               `json:"nodeGroup,omitempty"`
	ComputeZone          string               `json:"computeZone,omitempty"`
	CustomerID           string               `json:"customerID,omitempty"`
	IsBackendComponent   bool                 `json:"isBackendComponent,omitempty"`
	HasMore              bool                 `json:"hasMore,omitempty"`
	Page                 int                  `json:"page,omitempty"`
	PageSize             int                  `json:"pageSize,omitempty"`
	Total                int                  `json:"total,omitempty"`
	Timeline             []AlertTimelineEvent `json:"timeline"`
	RawJSON              []byte               `json:"-"`
}

Represents the full timeline for one alert

type AlertTimelineEvent

type AlertTimelineEvent struct {
	EventType      string            `json:"eventType,omitempty"`
	AlertStatus    string            `json:"alertStatus,omitempty"`
	EventTimestamp string            `json:"eventTimestamp,omitempty"`
	Message        string            `json:"message,omitempty"`
	Error          string            `json:"error,omitempty"`
	ExtraInfo      map[string]any    `json:"extraInfo,omitempty"`
	Incidents      []any             `json:"incidents,omitempty"`
	Actions        []SuggestedAction `json:"suggestedActions,omitempty"`
}

Represents one event in an alert timeline

type AlertTimelineFilterField

type AlertTimelineFilterField = FilterField

AlertTimelineFilterField represents one alert timeline filter and its available values.

type AlertTimelineFilterOption

type AlertTimelineFilterOption = FilterOption

AlertTimelineFilterOption represents one alert timeline filter value.

type AlertTimelineFilterOptions

type AlertTimelineFilterOptions = FilterOptions

AlertTimelineFilterOptions represents the alert timeline filters and sorting choices available to the caller.

type AlertTimelineFilters

type AlertTimelineFilters = Filters

AlertTimelineFilters contains the filter fields available for the selected alert timeline view.

type AlertTimelineNode

type AlertTimelineNode struct {
	NodeUUID      string `json:"nodeUuid"`
	Hostname      string `json:"hostname,omitempty"`
	ComputeZone   string `json:"computeZone,omitempty"`
	NodeGroup     string `json:"nodeGroup,omitempty"`
	GPUType       string `json:"gpuType,omitempty"`
	CriticalCount int    `json:"criticalCount,omitempty"`
	WarningCount  int    `json:"warningCount,omitempty"`
	ResolvedCount int    `json:"resolvedCount,omitempty"`
	HostStatus    string `json:"hostStatus,omitempty"`
	LastAlertTime string `json:"lastAlertTime,omitempty"`
}

Represents a node that has alert timeline history

type AlertTimelineNodeAlert

type AlertTimelineNodeAlert struct {
	AlertUUID            string `json:"alertUuid"`
	Component            string `json:"component,omitempty"`
	ComponentDisplayName string `json:"componentDisplayName,omitempty"`
	AlertStatus          string `json:"alertStatus,omitempty"`
	StartTime            string `json:"startTime,omitempty"`
	LastEventTime        string `json:"lastEventTime,omitempty"`
}

Represents one alert in a node's timeline history

type AlertTimelineNodeSortBy

type AlertTimelineNodeSortBy string

Represents supported sort fields for alert timeline nodes

func (AlertTimelineNodeSortBy) Valid

func (sortBy AlertTimelineNodeSortBy) Valid() bool

Reports whether the node sort field is accepted by the API

type AlertTimelineNodesPage

type AlertTimelineNodesPage struct {
	Nodes                    []AlertTimelineNode `json:"nodes"`
	HasMore                  bool                `json:"hasMore"`
	Page                     int                 `json:"page"`
	PageSize                 int                 `json:"pageSize"`
	Total                    int                 `json:"total"`
	TotalCritical            int                 `json:"totalCritical"`
	TotalWarning             int                 `json:"totalWarning"`
	TotalResolved            int                 `json:"totalResolved"`
	DistinctGPUTypeCount     int                 `json:"distinctGpuTypeCount"`
	DistinctNodeGroupCount   int                 `json:"distinctNodeGroupCount"`
	DistinctComputeZoneCount int                 `json:"distinctComputeZoneCount"`
	RawJSON                  []byte              `json:"-"`
}

Represents a paginated alert timeline node response

func (AlertTimelineNodesPage) PageInfo added in v1.1.0

func (page AlertTimelineNodesPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type AlertTimelineSortOrder

type AlertTimelineSortOrder string

Represents supported sort orders for alert timeline endpoints

func (AlertTimelineSortOrder) Valid

func (order AlertTimelineSortOrder) Valid() bool

Reports whether the sort order is accepted by alert timeline endpoints

type AlertTimelineSortingDefaults

type AlertTimelineSortingDefaults = SortingDefaults

AlertTimelineSortingDefaults reports the alert timeline sort defaults.

type AlertTimelineSortingOptions

type AlertTimelineSortingOptions = SortingOptions

AlertTimelineSortingOptions describes the supported alert timeline sort fields, orders, and defaults.

type AlertTimelineState

type AlertTimelineState string

Represents alert states accepted by alert timeline filters

func (AlertTimelineState) Valid

func (state AlertTimelineState) Valid() bool

Reports whether the alert timeline state is accepted by the API

type AlertsPage

type AlertsPage struct {
	Alerts         []Alert `json:"alerts"`
	Page           int     `json:"page"`
	PageSize       int     `json:"pageSize"`
	Total          int     `json:"total"`
	PageCursorNext string  `json:"pageCursorNext,omitempty"`
	RawJSON        []byte  `json:"-"`
}

Represents a paginated alert response with the raw backend payload

func (AlertsPage) PageInfo added in v1.1.0

func (page AlertsPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response. The alerts endpoint sends no hasMore field: it signals a further page with a cursor, and where there is none the counters have to be compared.

type AuthStatus

type AuthStatus struct {
	// Authenticated is true when the request reached the backend through the
	// authenticated path.
	Authenticated bool   `json:"authenticated"`
	RawJSON       []byte `json:"-"`
}

AuthStatus reports whether the configured credentials authenticate against the API.

type BlockDevice

type BlockDevice struct {
	FSType     string   `json:"fsType,omitempty"`
	MountPoint string   `json:"mountPoint,omitempty"`
	Name       string   `json:"name,omitempty"`
	Parents    []string `json:"parents,omitempty"`
	PartUUID   string   `json:"partUUID,omitempty"`
	Size       *int     `json:"size,omitempty"`
	Type       string   `json:"type,omitempty"`
	Used       *int     `json:"used,omitempty"`
	WWN        string   `json:"wwn,omitempty"`
}

Represents a node disk block device

type CPUInfo

type CPUInfo struct {
	Architecture string `json:"architecture,omitempty"`
	LogicalCores string `json:"logicalCores,omitempty"`
	Manufacturer string `json:"manufacturer,omitempty"`
	Type         string `json:"type,omitempty"`
}

Represents CPU metadata for a node

type CertChainStatus added in v1.1.0

type CertChainStatus struct {
	ExpirationDate    string `json:"x-nvidia-cert-expiration-date,omitempty"`
	OCSPNonceMatches  *bool  `json:"x-nvidia-cert-ocsp-nonce-matches,omitempty"`
	OCSPResponseValid *bool  `json:"x-nvidia-cert-ocsp-response-valid,omitempty"`
	OCSPStatus        string `json:"x-nvidia-cert-ocsp-status,omitempty"`
	RevocationReason  string `json:"x-nvidia-cert-revocation-reason,omitempty"`
	Status            string `json:"x-nvidia-cert-status,omitempty"`
}

Represents certificate-chain validation details returned in attestation claims

type Client

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

Calls the Fleet Intelligence customer API

func NewClient

func NewClient(baseURL, apiKey string, opts ...Option) (*Client, error)

Creates a Fleet Intelligence API client

func (*Client) APIKeyConfigured

func (c *Client) APIKeyConfigured() bool

Reports whether a non-empty API key is configured

func (*Client) BaseURL

func (c *Client) BaseURL() string

Returns the configured API base URL

func (*Client) DescribeAlertTimeline

func (c *Client) DescribeAlertTimeline(ctx context.Context, nodeUUID, alertUUID string) (AlertTimelineDetails, error)

Retrieves the full event timeline for one alert

func (*Client) DescribeAlertTimelineWithOptions

func (c *Client) DescribeAlertTimelineWithOptions(ctx context.Context, nodeUUID, alertUUID string, opts DescribeAlertTimelineOptions) (AlertTimelineDetails, error)

Retrieves one alert's event timeline with optional sorting and pagination

func (*Client) DescribeNode

func (c *Client) DescribeNode(ctx context.Context, nodeUUID string) (NodeDetails, error)

Retrieves detail for a single node using the configured API client

func (*Client) DescribeNodeWithOptions added in v1.1.0

func (c *Client) DescribeNodeWithOptions(
	ctx context.Context,
	nodeUUID string,
	opts DescribeNodeOptions,
) (NodeDetails, error)

Retrieves agent-specific detail for a single node using the configured API client

func (*Client) DescribeXIDBurst added in v1.1.0

func (c *Client) DescribeXIDBurst(ctx context.Context, burstID string) (XIDBurstDetails, error)

DescribeXIDBurst retrieves the details of one finalized XID burst

func (*Client) FetchSigningKey

func (c *Client) FetchSigningKey(ctx context.Context) ([]byte, error)

FetchSigningKey downloads the PEM-encoded public key used to sign inventory reports from the configured API's well-known endpoint. It is used by `report verify` when no local key is supplied.

func (*Client) GetAlertTimelineFilterOptions

func (c *Client) GetAlertTimelineFilterOptions(ctx context.Context, active bool) (AlertTimelineFilterOptions, error)

Gets alert timeline filter and sorting options for the active or historical view.

func (*Client) GetAuthStatus

func (c *Client) GetAuthStatus(ctx context.Context) (AuthStatus, error)

GetAuthStatus verifies the configured API key against the API by calling GET /v1/auth/status. A non-2xx response is returned as an *APIError so callers can distinguish rejected credentials (401/403) from other failures.

func (*Client) GetErrorReport

func (c *Client) GetErrorReport(ctx context.Context, opts ErrorReportOptions) (ErrorReport, error)

Retrieves an error report using the configured API client

func (*Client) GetEventBuckets

func (c *Client) GetEventBuckets(ctx context.Context, opts EventBucketsOptions) (EventBuckets, error)

GetEventBuckets retrieves time-bucketed event counts for histogram display

func (*Client) GetInventoryReport

func (c *Client) GetInventoryReport(ctx context.Context, opts InventoryReportOptions) (InventoryReport, error)

Retrieves an inventory report using the configured API client

func (*Client) GetNodeFilterOptions added in v1.1.0

func (c *Client) GetNodeFilterOptions(ctx context.Context, agentType NodeAgentType) (FilterOptions, error)

GetNodeFilterOptions gets the filters and sorting choices available when listing nodes. An empty agentType leaves the view to the backend default. The OOB (BMC/Redfish) view returns a reduced set of filters and sort fields.

func (*Client) GetNodeGroupFilterOptions added in v1.1.0

func (c *Client) GetNodeGroupFilterOptions(ctx context.Context) (FilterOptions, error)

GetNodeGroupFilterOptions gets the filters and sorting choices available when listing node groups.

func (*Client) GetOverview

func (c *Client) GetOverview(ctx context.Context, opts OverviewOptions) (Overview, error)

Fetches the system and fleet overview using the configured API client

func (*Client) GetXIDBurstFilterOptions added in v1.1.0

func (c *Client) GetXIDBurstFilterOptions(ctx context.Context, scope XIDBurstFilterOptionsScope) (XIDBurstFilterOptions, error)

GetXIDBurstFilterOptions gets the filter values available when listing XID bursts. Categories, subcategories, platform-disruption values, and DC-admin actions are returned only to cloud-provider/NCP callers, so a tenant key sees a reduced set. The scope optionally narrows the values to a time range and inventory selection; pass the zero value for everything available.

func (*Client) ListAlertTimelineNodes

func (c *Client) ListAlertTimelineNodes(ctx context.Context, opts ListAlertTimelineNodesOptions) (AlertTimelineNodesPage, error)

Lists nodes with alert timeline history

func (*Client) ListAlerts

func (c *Client) ListAlerts(ctx context.Context, opts ListAlertsOptions) (AlertsPage, error)

Lists alerts using the configured API client

func (*Client) ListComputeZones

func (c *Client) ListComputeZones(ctx context.Context, opts ListComputeZonesOptions) (ComputeZonesPage, error)

Lists compute zones using the configured API client

func (*Client) ListEvents

func (c *Client) ListEvents(ctx context.Context, opts EventListOptions) (EventsPage, error)

ListEvents retrieves events filtered by node, component, and time range

func (*Client) ListNodeAlertTimeline

func (c *Client) ListNodeAlertTimeline(ctx context.Context, opts ListNodeAlertTimelineOptions) (NodeAlertTimelinePage, error)

Lists alert timeline history for a specific node

func (*Client) ListNodeGroups

func (c *Client) ListNodeGroups(ctx context.Context, opts ListNodeGroupsOptions) (NodeGroupsPage, error)

Lists node groups using the configured API client

func (*Client) ListNodes

func (c *Client) ListNodes(ctx context.Context, opts ListNodesOptions) (NodesPage, error)

Lists nodes using the configured API client

func (*Client) ListTags

func (c *Client) ListTags(ctx context.Context, opts TagListOptions) (TagList, error)

ListTags retrieves the unique customer tags, optionally filtered by prefix and a single node, node group, or compute zone.

func (*Client) ListXIDBursts added in v1.1.0

func (c *Client) ListXIDBursts(ctx context.Context, opts ListXIDBurstsOptions) (XIDBurstsPage, error)

ListXIDBursts retrieves finalized XID bursts for the selected time range

func (*Client) NodeHealthHistory

func (c *Client) NodeHealthHistory(ctx context.Context, nodeUUID string, opts NodeHealthHistoryOptions) (NodeHealthHistory, error)

NodeHealthHistory retrieves the health timeline and summary for a single node

func (*Client) PreviewSetNodeTags added in v1.1.0

func (c *Client) PreviewSetNodeTags(_ context.Context, nodeUUID string, opts SetNodeTagsOptions) (RequestPreview, error)

PreviewSetNodeTags builds the request SetNodeTags would send, without sending it. Building the body needs no network call, so there is no request context to bound; both PreviewSetNodeTags and SetNodeTags build the body through buildSetNodeTagsRequest, so a preview can never disagree with the request that is actually issued.

func (*Client) PreviewUpdateComputeZone added in v1.1.0

func (c *Client) PreviewUpdateComputeZone(ctx context.Context, zoneID string, opts UpdateComputeZoneOptions) (RequestPreview, error)

PreviewUpdateComputeZone builds the request UpdateComputeZone would send, without sending it. It still performs the read the merge depends on (getComputeZone), since the request body cannot be known without it, but issues no write. Both PreviewUpdateComputeZone and UpdateComputeZone build the body through buildComputeZoneUpdateRequest, so a preview can never disagree with the request that is actually issued.

func (*Client) SetNodeTags added in v1.1.0

func (c *Client) SetNodeTags(ctx context.Context, nodeUUID string, opts SetNodeTagsOptions) (NodeTags, error)

SetNodeTags replaces every tag on a node with opts.Tags and returns the tags the node carries afterwards. This is a replacement, not a merge: a tag the node already has that is absent from opts.Tags is removed, and an empty opts.Tags clears the node's tags entirely.

Tags are validated against the backend's rules before any request is made; see MaxTagLength and the format described on the `tag set` command.

func (*Client) UpdateComputeZone added in v1.1.0

func (c *Client) UpdateComputeZone(ctx context.Context, zoneID string, opts UpdateComputeZoneOptions) (ComputeZoneUpdate, error)

UpdateComputeZone updates a compute zone's type, contact, and location.

The update is read-modify-write: PUT /v1/computezones replaces the zone's metadata rather than patching it, so the zone is read first and the supplied options are merged over what it already stores. Fields the caller did not name are echoed back unchanged, which makes setting a contact safe for a location the caller never mentioned. There is no ETag, so a concurrent edit between the read and the write is lost.

type ComputeZone

type ComputeZone struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Type      string    `json:"type,omitempty"`
	Location  *Location `json:"location,omitempty"`
	NodeCount *int      `json:"nodeCount,omitempty"`
}

Represents a compute zone

type ComputeZoneUpdate added in v1.1.0

type ComputeZoneUpdate struct {
	ID           string `json:"id"`
	Type         string `json:"type,omitempty"`
	ContactEmail string `json:"contactEmail,omitempty"`
	ContactPIC   string `json:"contactPIC,omitempty"`
	City         string `json:"city,omitempty"`
	Country      string `json:"country,omitempty"`
	Region       string `json:"region,omitempty"`
	Latitude     string `json:"latitude,omitempty"`
	Longitude    string `json:"longitude,omitempty"`
	RawJSON      []byte `json:"-"`
}

ComputeZoneUpdate reports the compute zone metadata written by UpdateComputeZone, together with the raw backend payload.

The fields describe the document that was sent: PUT /v1/computezones replaces the zone's metadata, and the backend's own response carries only the zone ID. Coordinates are the text that was written, for the reason given on UpdateComputeZoneOptions.

type ComputeZoneView

type ComputeZoneView string

Represents supported response shapes for listing compute zones

const (
	ComputeZoneViewDetail ComputeZoneView = "detail"
	ComputeZoneViewBasic  ComputeZoneView = "basic"
)

func (ComputeZoneView) Valid

func (view ComputeZoneView) Valid() bool

Reports whether the view is accepted by the API

type ComputeZonesPage

type ComputeZonesPage struct {
	ComputeZones []ComputeZone `json:"computezones"`
	HasMore      bool          `json:"hasMore"`
	Page         int           `json:"page"`
	PageSize     int           `json:"pageSize"`
	Total        int           `json:"total"`
	RawJSON      []byte        `json:"-"`
}

Represents a paginated compute zone response with the raw backend payload

func (ComputeZonesPage) PageInfo added in v1.1.0

func (page ComputeZonesPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type DescribeAlertTimelineOptions

type DescribeAlertTimelineOptions struct {
	Order    AlertTimelineSortOrder
	Page     *int
	PageSize *int
}

Represents request options for retrieving one alert's event timeline

type DescribeNodeOptions added in v1.1.0

type DescribeNodeOptions struct {
	AgentType NodeAgentType
}

Represents request options for describing a node

type DiskInfo

type DiskInfo struct {
	BlockDevices      []BlockDevice `json:"blockDevices,omitempty"`
	ContainerRootDisk string        `json:"containerRootDisk,omitempty"`
}

Represents disk metadata for a node

type ErrorReport

type ErrorReport struct {
	View     ErrorReportView      `json:"view"`
	GroupBy  ErrorReportGroupBy   `json:"groupBy,omitempty"`
	Errors   []ErrorReportError   `json:"errors,omitempty"`
	Nodes    []ErrorReportNode    `json:"nodes,omitempty"`
	Overview *ErrorReportOverview `json:"overview,omitempty"`
	Graph    *ErrorReportGraph    `json:"graph,omitempty"`
	HasMore  bool                 `json:"hasMore"`
	Page     int                  `json:"page"`
	PageSize int                  `json:"pageSize"`
	Total    int                  `json:"total"`
	RawJSON  []byte               `json:"-"`
	RawCSV   []byte               `json:"-"`
}

Represents an error report response

func (ErrorReport) PageInfo added in v1.1.0

func (page ErrorReport) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type ErrorReportError

type ErrorReportError struct {
	Name            string           `json:"name,omitempty"`
	Count           *int             `json:"count,omitempty"`
	NodeCount       *int             `json:"nodeCount,omitempty"`
	SuggestedAction *SuggestedAction `json:"suggestedAction,omitempty"`
}

Represents one error grouping row in an error list report

type ErrorReportGraph

type ErrorReportGraph struct {
	Result    []ErrorTimeSeries `json:"result,omitempty"`
	TimeRange *TimeRange        `json:"timeRange,omitempty"`
}

Represents time-series error report data

type ErrorReportGroupBy

type ErrorReportGroupBy string

Represents supported groupings for error list reports

func (ErrorReportGroupBy) Valid

func (groupBy ErrorReportGroupBy) Valid() bool

Reports whether the error report grouping is accepted by the API

type ErrorReportNode

type ErrorReportNode struct {
	NodeUUID string   `json:"nodeUUID,omitempty"`
	Hostname string   `json:"hostname,omitempty"`
	Errors   []string `json:"errors,omitempty"`
}

Represents one node grouping row in an error list report

type ErrorReportOptions

type ErrorReportOptions struct {
	View           ErrorReportView
	GroupBy        ErrorReportGroupBy
	Format         ReportFormat
	Page           *int
	PageSize       *int
	Step           string
	ComputeZoneIDs []string
	NodeGroupIDs   []string
	Tags           []string
	Errors         []string
	Severities     []ErrorSeverity
	TimeMode       ErrorReportTimeMode
	Window         string
	StartTime      string
	EndTime        string
}

Represents request options for error reports

func (ErrorReportOptions) Validate added in v1.1.0

func (opts ErrorReportOptions) Validate() error

Validate reports whether the options describe a request the API accepts. GetErrorReport calls it; ValidateValues is the narrower check a front end wants when it applies its own rules for how flags combine.

func (ErrorReportOptions) ValidateValues added in v1.1.0

func (opts ErrorReportOptions) ValidateValues() error

ValidateValues reports whether each option value on its own is one the API accepts, without checking how the options combine.

A front end calls this to reject a bad value before applying its own combination rules, which it phrases in its own vocabulary: the CLI names the flag the user typed. Validate covers both and is what the request path uses.

type ErrorReportOverview

type ErrorReportOverview struct {
	TotalErrorNodes *int `json:"totalErrorNodes,omitempty"`
	TotalErrorTypes *int `json:"totalErrorTypes,omitempty"`
	TotalErrors     *int `json:"totalErrors,omitempty"`
}

Represents aggregate error report statistics

type ErrorReportTimeMode

type ErrorReportTimeMode string

Represents supported time filter modes for error reports

func (ErrorReportTimeMode) Valid

func (mode ErrorReportTimeMode) Valid() bool

Reports whether the error report time mode is accepted by the API

type ErrorReportView

type ErrorReportView string

Represents supported error report views

func (ErrorReportView) Valid

func (view ErrorReportView) Valid() bool

Reports whether the error report view is accepted by the API

type ErrorSeverity added in v1.1.0

type ErrorSeverity string

Represents supported error severities for error reports

func (ErrorSeverity) Valid added in v1.1.0

func (severity ErrorSeverity) Valid() bool

Reports whether the error severity is accepted by the API

type ErrorTimeSeries

type ErrorTimeSeries struct {
	Error  string `json:"error,omitempty"`
	Values string `json:"values,omitempty"`
}

Represents one error time-series result

type Event

type Event struct {
	EventID          string            `json:"eventId,omitempty"`
	NodeUUID         string            `json:"nodeUUID,omitempty"`
	Component        string            `json:"component,omitempty"`
	Name             string            `json:"name,omitempty"`
	Type             string            `json:"type,omitempty"`
	Message          string            `json:"message,omitempty"`
	Timestamp        string            `json:"timestamp,omitempty"`
	CreatedAt        string            `json:"createdAt,omitempty"`
	SuggestedActions []SuggestedAction `json:"suggestedActions,omitempty"`
}

Event represents a single fleet event

type EventBucket

type EventBucket struct {
	StartTime      string `json:"startTime,omitempty"`
	EndTime        string `json:"endTime,omitempty"`
	FirstEventTime string `json:"firstEventTime,omitempty"`
	Count          *int   `json:"count,omitempty"`
}

EventBucket represents the event count for a single time interval

type EventBuckets

type EventBuckets struct {
	BucketInterval string        `json:"bucketInterval,omitempty"`
	Buckets        []EventBucket `json:"buckets,omitempty"`
	RawJSON        []byte        `json:"-"`
}

EventBuckets represents time-bucketed event counts with the raw backend payload

type EventBucketsOptions

type EventBucketsOptions struct {
	NodeUUID   string
	Component  string
	Window     string
	StartTime  string
	EndTime    string
	MaxBuckets *int
}

EventBucketsOptions represents request options for time-bucketed event counts. A time range is required, following the same rules as EventListOptions.

type EventListOptions

type EventListOptions struct {
	NodeUUID  string
	Component string
	Window    string
	StartTime string
	EndTime   string
	Page      *int
	PageSize  *int
}

EventListOptions represents request options for listing events. A time range is required: supply either Window (relative) or StartTime and EndTime (absolute), but not both.

type EventsPage

type EventsPage struct {
	Events   []Event `json:"events"`
	HasMore  bool    `json:"hasMore"`
	Page     int     `json:"page"`
	PageSize int     `json:"pageSize"`
	Total    int     `json:"total"`
	RawJSON  []byte  `json:"-"`
}

EventsPage represents a paginated event list with the raw backend payload

func (EventsPage) PageInfo added in v1.1.0

func (page EventsPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type FilterField added in v1.1.0

type FilterField struct {
	Name    string         `json:"name"`
	Options []FilterOption `json:"options"`
}

FilterField represents one filter and the values it accepts.

type FilterOption added in v1.1.0

type FilterOption struct {
	ID      string
	Value   string
	Options []FilterOption
}

FilterOption represents one filter value. The backend sends either a bare string or an object carrying an ID and a display value; an object may also nest child options, as a compute zone nests its node groups.

func (FilterOption) MarshalJSON added in v1.1.0

func (option FilterOption) MarshalJSON() ([]byte, error)

MarshalJSON preserves the option's original string or object shape.

func (*FilterOption) UnmarshalJSON added in v1.1.0

func (option *FilterOption) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes the string and object forms used by the shared options API.

type FilterOptions added in v1.1.0

type FilterOptions struct {
	Filters Filters        `json:"filters"`
	Sorting SortingOptions `json:"sorting"`
	RawJSON []byte         `json:"-"`
}

FilterOptions represents the filter values and sorting choices a list endpoint accepts. The backend returns this same envelope for nodes, node groups, and the alert timeline.

type Filters added in v1.1.0

type Filters struct {
	Fields []FilterField `json:"fields"`
}

Filters contains the filter fields available for the requested view.

type GPUDevice

type GPUDevice struct {
	BoardID      *int   `json:"boardID,omitempty"`
	BusID        string `json:"busID,omitempty"`
	ChassisSN    string `json:"chassisSN,omitempty"`
	GPUIndex     string `json:"gpuIndex,omitempty"`
	MinorID      string `json:"minorID,omitempty"`
	SerialNumber string `json:"sn,omitempty"`
	UUID         string `json:"uuid,omitempty"`
	VBIOSVersion string `json:"vbiosVersion,omitempty"`
}

Represents a GPU device on a node

type GPUFirmwareVersion added in v1.1.0

type GPUFirmwareVersion struct {
	FirmwareVersion string `json:"firmwareVersion,omitempty"`
	GPUIndex        string `json:"gpuIndex,omitempty"`
}

Represents firmware reported by one GPU

type GPUInfo

type GPUInfo struct {
	Architecture string      `json:"architecture,omitempty"`
	GPUs         []GPUDevice `json:"gpus,omitempty"`
	Manufacturer string      `json:"manufacturer,omitempty"`
	Memory       string      `json:"memory,omitempty"`
	Product      string      `json:"product,omitempty"`
}

Represents GPU metadata for a node

type InvalidOptionError added in v1.1.0

type InvalidOptionError struct {
	// Option is a stable key for the rejected option, such as "view",
	// "sortBy", or "health". It is deliberately not the prose in Description:
	// callers match on it, so it does not change when wording does.
	Option string
	// Description names the option in the SDK's own terms, e.g. "node health".
	Description string
	Value       string
	// Expected lists the accepted values, empty when the option has no short
	// list to offer.
	Expected string
}

InvalidOptionError reports an option value the API will not accept.

The Validate methods on the list option types return it so that a front end can re-render the rule in its own vocabulary rather than restating the rule itself. The CLI uses Option to look up the flag that carries the option, so its errors name the flag the user typed while the rule lives here only.

func (*InvalidOptionError) Error added in v1.1.0

func (e *InvalidOptionError) Error() string

type InventoryNode

type InventoryNode struct {
	NodeUUID                  string    `json:"nodeUUID"`
	Hostname                  string    `json:"hostname,omitempty"`
	ComputeZone               string    `json:"computeZone,omitempty"`
	NodeGroup                 string    `json:"nodeGroup,omitempty"`
	GPUType                   string    `json:"gpuType,omitempty"`
	GPUCount                  *int      `json:"gpuCount,omitempty"`
	PublicIP                  string    `json:"publicIP,omitempty"`
	PrivateIP                 string    `json:"privateIP,omitempty"`
	VerificationCheck         string    `json:"verificationCheck,omitempty"`
	VerificationCheckReason   string    `json:"verificationCheckReason,omitempty"`
	LastVerificationCheckTime string    `json:"lastVerificationCheckTS,omitempty"`
	FirmwareCheck             string    `json:"firmwareCheck,omitempty"`
	EnrolledAt                string    `json:"enrolledAt,omitempty"`
	RemovedAt                 string    `json:"removedAt,omitempty"`
	Location                  *Location `json:"location,omitempty"`
	SerialNumbers             []string  `json:"serialNumbers,omitempty"`
}

Represents one inventory row in an inventory report

type InventoryReport

type InventoryReport struct {
	Nodes    []InventoryNode `json:"nodes"`
	HasMore  bool            `json:"hasMore"`
	Page     int             `json:"page"`
	PageSize int             `json:"pageSize"`
	Total    int             `json:"total"`
	RawJSON  []byte          `json:"-"`
	RawCSV   []byte          `json:"-"`

	// RawSigned holds the signed CSV bundle (a zip) when Signed is requested.
	RawSigned []byte `json:"-"`
	// Filename is the server-suggested filename for a signed bundle download.
	Filename string `json:"-"`
}

Represents an inventory report response

func (InventoryReport) PageInfo added in v1.1.0

func (page InventoryReport) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type InventoryReportOptions

type InventoryReportOptions struct {
	Format         ReportFormat
	Signed         bool
	ComputeZoneIDs []string
	NodeGroupIDs   []string
	Tags           []string
	StartTime      string
	EndTime        string
	SortBy         InventoryReportSortBy
	Order          InventoryReportSortOrder
	Page           *int
	PageSize       *int
}

Represents request options for inventory reports

func (InventoryReportOptions) Validate added in v1.1.0

func (opts InventoryReportOptions) Validate() error

Validate reports whether the options describe a request the API accepts. GetInventoryReport calls it; ValidateValues is the narrower check a front end wants when it applies its own rules for how flags combine.

func (InventoryReportOptions) ValidateValues added in v1.1.0

func (opts InventoryReportOptions) ValidateValues() error

ValidateValues reports whether each option value on its own is one the API accepts, without checking how the options combine. See ErrorReportOptions.ValidateValues for why the two are separate.

type InventoryReportSortBy

type InventoryReportSortBy string

Represents supported inventory report sort fields

func (InventoryReportSortBy) Valid

func (sortBy InventoryReportSortBy) Valid() bool

Reports whether the inventory report sort field is accepted by the API

type InventoryReportSortOrder

type InventoryReportSortOrder string

Represents supported inventory report sort orders

func (InventoryReportSortOrder) Valid

func (order InventoryReportSortOrder) Valid() bool

Reports whether the inventory report sort order is accepted by the API

type JWTClaims added in v1.1.0

type JWTClaims struct {
	EATNonce                                    string            `json:"eat_nonce,omitempty"`
	ExpiresAt                                   *int              `json:"exp,omitempty"`
	HardwareModel                               string            `json:"hwmodel,omitempty"`
	IssuedAt                                    *int              `json:"iat,omitempty"`
	Issuer                                      string            `json:"iss,omitempty"`
	JWTID                                       string            `json:"jti,omitempty"`
	MeasurementResults                          string            `json:"measres,omitempty"`
	NotBefore                                   *int              `json:"nbf,omitempty"`
	Subject                                     string            `json:"sub,omitempty"`
	UEID                                        string            `json:"ueid,omitempty"`
	NVIDIAAttestationWarning                    string            `json:"x-nvidia-attestation-warning,omitempty"`
	NVIDIAErrorDetails                          []NRASErrorDetail `json:"x-nvidia-error-details,omitempty"`
	NVIDIAGPUArchitectureCheck                  *bool             `json:"x-nvidia-gpu-arch-check,omitempty"`
	NVIDIAGPUAttestationReportCertChain         *CertChainStatus  `json:"x-nvidia-gpu-attestation-report-cert-chain,omitempty"`
	NVIDIAGPUAttestationReportNonceMatch        *bool             `json:"x-nvidia-gpu-attestation-report-nonce-match,omitempty"`
	NVIDIAGPUAttestationReportParsed            *bool             `json:"x-nvidia-gpu-attestation-report-parsed,omitempty"`
	NVIDIAGPUAttestationReportSignatureVerified *bool             `json:"x-nvidia-gpu-attestation-report-signature-verified,omitempty"`
	NVIDIAGPUVBIOSRIMFetched                    *bool             `json:"x-nvidia-gpu-vbios-rim-fetched,omitempty"`
	NVIDIAGPUVBIOSRIMMeasurementsAvailable      *bool             `json:"x-nvidia-gpu-vbios-rim-measurements-available,omitempty"`
	NVIDIAGPUVBIOSVersion                       string            `json:"x-nvidia-gpu-vbios-version,omitempty"`
	NVIDIAMismatchMeasurementRecords            []any             `json:"x-nvidia-mismatch-measurement-records,omitempty"`
	NVIDIAOverallAttestationResult              *bool             `json:"x-nvidia-overall-att-result,omitempty"`
}

Represents claims returned for a GPU attestation result

type ListAlertTimelineNodesOptions

type ListAlertTimelineNodesOptions struct {
	Active         bool
	Hostname       string
	SortBy         AlertTimelineNodeSortBy
	Order          AlertTimelineSortOrder
	GPUTypes       []string
	NodeGroupIDs   []string
	ComputeZoneIDs []string
	AlertStates    []AlertTimelineState
	ComponentTypes []string
	Page           *int
	PageSize       *int
}

Represents request options for listing alert timeline nodes

func (ListAlertTimelineNodesOptions) Validate added in v1.1.0

func (opts ListAlertTimelineNodesOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListAlertTimelineNodes calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListAlertsOptions

type ListAlertsOptions struct {
	NodeUUID  string
	Component string
	State     AlertState
	Severity  AlertSeverity
	Page      *int
	PageSize  *int
}

Represents request options for listing alerts

func (ListAlertsOptions) Validate added in v1.1.0

func (opts ListAlertsOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListAlerts calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListComputeZonesOptions

type ListComputeZonesOptions struct {
	View           ComputeZoneView
	IncludeMetrics *bool
	ZoneIDs        []string
	Page           *int
	PageSize       *int
}

Represents request options for listing compute zones

func (ListComputeZonesOptions) Validate added in v1.1.0

func (opts ListComputeZonesOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListComputeZones calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListNodeAlertTimelineOptions

type ListNodeAlertTimelineOptions struct {
	NodeUUID       string
	Active         bool
	WithoutPSIRT   bool
	SortBy         AlertTimelineAlertSortBy
	Order          AlertTimelineSortOrder
	AlertStates    []AlertTimelineState
	ComponentTypes []string
	GPUTypes       []string
	NodeGroupIDs   []string
	ComputeZoneIDs []string
	Page           *int
	PageSize       *int
}

Represents request options for listing alert history for one node

func (ListNodeAlertTimelineOptions) Validate added in v1.1.0

func (opts ListNodeAlertTimelineOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListNodeAlertTimeline calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListNodeGroupsOptions

type ListNodeGroupsOptions struct {
	View             NodeGroupView
	IncludeMetrics   *bool
	ComputeZoneIDs   []string
	ComputeZoneNames []string
	NodeGroupIDs     []string
	HealthStatuses   []NodeGroupHealthStatus
	GPUTypes         []string
	SortBy           NodeGroupSortBy
	Order            NodeGroupSortOrder
	Page             *int
	PageSize         *int
}

Represents request options for listing node groups

func (ListNodeGroupsOptions) Validate added in v1.1.0

func (opts ListNodeGroupsOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListNodeGroups calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListNodesOptions

type ListNodesOptions struct {
	View               NodeView
	AgentType          NodeAgentType
	NodeUUIDs          []string
	HealthStatuses     []NodeHealthStatus
	ComputeZoneIDs     []string
	ComputeZoneNames   []string
	NodeGroupIDs       []string
	NodeGroupNames     []string
	GPUTypes           []string
	GPUCounts          []int
	PublicIPs          []string
	PrivateIPs         []string
	Hostname           string
	NodeName           string
	BMCHostname        string
	AgentStatuses      []NodeAgentStatus
	VerificationChecks []NodeVerificationCheck
	FirmwareChecks     []NodeFirmwareCheck
	SortBy             NodeSortBy
	Order              NodeSortOrder
	Page               *int
	PageSize           *int
}

Represents request options for listing nodes

func (ListNodesOptions) Validate added in v1.1.0

func (opts ListNodesOptions) Validate() error

Validate reports whether the options describe a request the API accepts. ListNodes calls it, and a caller can call it first to reject a bad request without opening a connection.

type ListXIDBurstsOptions added in v1.1.0

type ListXIDBurstsOptions struct {
	Window    string
	StartTime string
	EndTime   string

	NodeUUID       string
	NodeGroupIDs   []string
	ComputeZoneIDs []string

	// Exclusion filters select every assignment except the supplied IDs. Each
	// cannot be combined with the inclusive filter for the same dimension.
	ExcludeNodeGroupIDs   []string
	ExcludeComputeZoneIDs []string

	JobDisruption                   *bool
	JobDisruptionDueToPlatformIssue *bool
	XIDNumbers                      []int

	HostnameSearch             string
	CategorySearch             string
	SubcategorySearch          string
	TenantActionSearch         string
	TenantInvestigationSearch  string
	DCAdminActionSearch        string
	DCAdminInvestigationSearch string

	Categories            []string
	Subcategories         []string
	TenantActions         []string
	TenantInvestigations  []string
	DCAdminActions        []string
	DCAdminInvestigations []string

	SortBy    XIDBurstSortBy
	SortOrder XIDBurstSortOrder
	Page      *int
	PageSize  *int
}

ListXIDBurstsOptions represents request options for listing finalized XID bursts. A time range is required: supply either Window (relative) or StartTime and EndTime (absolute), but not both. Values within each slice filter are OR-combined; filters of different kinds are AND-combined.

type Location added in v1.1.0

type Location struct {
	City      string   `json:"city,omitempty"`
	Country   string   `json:"country,omitempty"`
	Region    string   `json:"region,omitempty"`
	Latitude  *float32 `json:"latitude,omitempty"`
	Longitude *float32 `json:"longitude,omitempty"`
}

Represents physical location metadata for a fleet resource.

type MemoryInfo

type MemoryInfo struct {
	TotalBytes string `json:"totalBytes,omitempty"`
}

Represents memory metadata for a node

type NICInfo

type NICInfo struct {
	PrivateIPInterfaces []NICInterface `json:"privateIPInterfaces,omitempty"`
}

Represents network interface metadata for a node

type NICInterface

type NICInterface struct {
	Interface string `json:"interface,omitempty"`
	IP        string `json:"ip,omitempty"`
	MAC       string `json:"mac,omitempty"`
}

Represents private network interface metadata for a node

type NRASErrorDetail added in v1.1.0

type NRASErrorDetail struct {
	Code        *int   `json:"code,omitempty"`
	Description string `json:"description,omitempty"`
	FieldName   string `json:"fieldName,omitempty"`
	HTTPStatus  string `json:"httpStatus,omitempty"`
	Message     string `json:"message,omitempty"`
}

Represents an NRAS error returned in attestation claims

type Node

type Node struct {
	UUID                       string                      `json:"nodeUUID"`
	Hostname                   string                      `json:"hostname,omitempty"`
	NodeName                   string                      `json:"nodeName,omitempty"`
	NodeKind                   NodeKind                    `json:"nodeKind,omitempty"`
	AgentType                  string                      `json:"agentType,omitempty"`
	AgentVersion               string                      `json:"agentVersion,omitempty"`
	BMCHostname                string                      `json:"bmcHostname,omitempty"`
	BMCIP                      string                      `json:"bmcIP,omitempty"`
	ComputeZone                string                      `json:"computeZone,omitempty"`
	NodeGroup                  string                      `json:"nodeGroup,omitempty"`
	Health                     string                      `json:"healthStatus,omitempty"`
	GPUType                    string                      `json:"gpuType,omitempty"`
	GPUCount                   *int                        `json:"gpuCount,omitempty"`
	AgentStatus                string                      `json:"agentStatus,omitempty"`
	VerificationCheck          string                      `json:"verificationCheck,omitempty"`
	VerificationCheckExtraInfo *VerificationCheckExtraInfo `json:"verificationCheckExtraInfo,omitempty"`
	VerificationCheckReason    string                      `json:"verificationCheckReason,omitempty"`
	FirmwareCheck              string                      `json:"firmwareCheck,omitempty"`
	GPUDriverVersion           string                      `json:"gpuDriverVersion,omitempty"`
	GPUFirmwareVersions        []GPUFirmwareVersion        `json:"gpuFirmwareVersions,omitempty"`
	KernelVersion              string                      `json:"kernelVersion,omitempty"`
	PublicIP                   string                      `json:"publicIP,omitempty"`
	PrivateIP                  string                      `json:"privateIP,omitempty"`
	LastVerificationCheckTime  string                      `json:"lastVerificationCheckTS,omitempty"`
	LastUpdatedTime            string                      `json:"lastUpdatedTS,omitempty"`
}

Represents a node

type NodeAgentStatus

type NodeAgentStatus string

Represents supported agent status filters for listing nodes

func (NodeAgentStatus) Valid

func (status NodeAgentStatus) Valid() bool

Reports whether the agent status is accepted by the API

type NodeAgentType added in v1.1.0

type NodeAgentType string

Represents the agent source used to list or describe nodes

func (NodeAgentType) Valid added in v1.1.0

func (agentType NodeAgentType) Valid() bool

Reports whether the agent type is accepted by the API

type NodeAlertTimelinePage

type NodeAlertTimelinePage struct {
	NodeUUID string                   `json:"nodeUuid"`
	Hostname string                   `json:"hostname,omitempty"`
	Alerts   []AlertTimelineNodeAlert `json:"alerts"`
	HasMore  bool                     `json:"hasMore"`
	Page     int                      `json:"page"`
	PageSize int                      `json:"pageSize"`
	Total    int                      `json:"total"`
	RawJSON  []byte                   `json:"-"`
}

Represents a paginated alert history response for one node

func (NodeAlertTimelinePage) PageInfo added in v1.1.0

func (page NodeAlertTimelinePage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type NodeDetails

type NodeDetails struct {
	Node
	ComputeZoneID           string         `json:"computeZoneId,omitempty"`
	NodeGroupID             string         `json:"nodeGroupId,omitempty"`
	EnrolledAt              string         `json:"enrolledAt,omitempty"`
	Location                *Location      `json:"location,omitempty"`
	HealthyComponentCount   *int           `json:"healthyComponentCount,omitempty"`
	DegradedComponentCount  *int           `json:"degradedComponentCount,omitempty"`
	UnhealthyComponentCount *int           `json:"unhealthyComponentCount,omitempty"`
	Resources               *NodeResources `json:"resources,omitempty"`
	SystemInfo              *SystemInfo    `json:"systemInfo,omitempty"`
	OOBInventory            *OOBInventory  `json:"oobInventory,omitempty"`
	Tags                    []string       `json:"tags,omitempty"`
	RawJSON                 []byte         `json:"-"`
}

Represents detailed node metadata

type NodeFirmwareCheck

type NodeFirmwareCheck string

Represents supported firmware check filters for listing nodes

func (NodeFirmwareCheck) Valid

func (check NodeFirmwareCheck) Valid() bool

Reports whether the firmware check status is accepted by the API

type NodeGroup

type NodeGroup struct {
	ID               string   `json:"id"`
	Name             string   `json:"name"`
	ComputeZoneID    string   `json:"computeZoneId,omitempty"`
	ComputeZoneName  string   `json:"computeZoneName,omitempty"`
	Health           string   `json:"health,omitempty"`
	HealthPercentage *float32 `json:"healthPercentage,omitempty"`
	NodeCount        *int     `json:"nodeCount,omitempty"`
}

Represents a node group

type NodeGroupHealthStatus

type NodeGroupHealthStatus string

Represents supported health filters for listing node groups

func (NodeGroupHealthStatus) Valid

func (status NodeGroupHealthStatus) Valid() bool

Reports whether the health status is accepted by the API

type NodeGroupSortBy

type NodeGroupSortBy string

Represents supported sort fields for listing node groups

func (NodeGroupSortBy) Valid

func (sortBy NodeGroupSortBy) Valid() bool

Reports whether the sort field is accepted by the API

type NodeGroupSortOrder

type NodeGroupSortOrder string

Represents supported sort orders for listing node groups

func (NodeGroupSortOrder) Valid

func (order NodeGroupSortOrder) Valid() bool

Reports whether the sort order is accepted by the API

type NodeGroupView

type NodeGroupView string

Represents supported response shapes for listing node groups

func (NodeGroupView) Valid

func (view NodeGroupView) Valid() bool

Reports whether the view is accepted by the API

type NodeGroupsPage

type NodeGroupsPage struct {
	NodeGroups []NodeGroup `json:"nodeGroups"`
	HasMore    bool        `json:"hasMore"`
	Page       int         `json:"page"`
	PageSize   int         `json:"pageSize"`
	Total      int         `json:"total"`
	RawJSON    []byte      `json:"-"`
}

Represents a paginated node group response with the raw backend payload

func (NodeGroupsPage) PageInfo added in v1.1.0

func (page NodeGroupsPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type NodeHealthHistory

type NodeHealthHistory struct {
	EnrolledAt    string              `json:"enrolledAt,omitempty"`
	HealthSummary *NodeHealthSummary  `json:"healthSummary,omitempty"`
	Segments      []NodeHealthSegment `json:"machineStatus,omitempty"`
	RawJSON       []byte              `json:"-"`
}

NodeHealthHistory represents a node's health timeline and summary over a window

type NodeHealthHistoryOptions

type NodeHealthHistoryOptions struct {
	// StartTime is the start of the window in RFC3339 format (required)
	StartTime string
	// EndTime is the end of the window in RFC3339 format (required)
	EndTime string
}

NodeHealthHistoryOptions represents the time window for a node health history query

type NodeHealthSegment

type NodeHealthSegment struct {
	Status    string `json:"status,omitempty"`
	StartTime string `json:"startTime,omitempty"`
	EndTime   string `json:"endTime,omitempty"`
}

NodeHealthSegment represents a single health state interval in a node's timeline

type NodeHealthStatus

type NodeHealthStatus string

Represents supported health filters for listing nodes

func (NodeHealthStatus) Valid

func (status NodeHealthStatus) Valid() bool

Reports whether the health status is accepted by the API

type NodeHealthSummary

type NodeHealthSummary struct {
	HealthyPercentage        *float32 `json:"healthyPercentage,omitempty"`
	DegradedPercentage       *float32 `json:"degradedPercentage,omitempty"`
	UnhealthyPercentage      *float32 `json:"unhealthyPercentage,omitempty"`
	HealthyDurationSeconds   *float32 `json:"healthyDurationSeconds,omitempty"`
	DegradedDurationSeconds  *float32 `json:"degradedDurationSeconds,omitempty"`
	UnhealthyDurationSeconds *float32 `json:"unhealthyDurationSeconds,omitempty"`
}

NodeHealthSummary represents aggregate health durations and percentages for a node

type NodeKind added in v1.1.1

type NodeKind string

NodeKind classifies the independently addressable node that produced an OOB inventory document.

const (
	NodeKindUnknown    NodeKind = "unknown"
	NodeKindCompute    NodeKind = "compute"
	NodeKindNVSwitch   NodeKind = "nvswitch"
	NodeKindPowerShelf NodeKind = "power_shelf"
)

type NodeResources

type NodeResources struct {
	CPUInfo    *CPUInfo    `json:"cpuInfo,omitempty"`
	DiskInfo   *DiskInfo   `json:"diskInfo,omitempty"`
	GPUInfo    *GPUInfo    `json:"gpuInfo,omitempty"`
	MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"`
	NICInfo    *NICInfo    `json:"nicInfo,omitempty"`
}

Represents hardware and network resource metadata for a node

type NodeSortBy

type NodeSortBy string

Represents supported sort fields for listing nodes

func (NodeSortBy) Valid

func (sortBy NodeSortBy) Valid() bool

Reports whether the sort field is accepted by the API

type NodeSortOrder

type NodeSortOrder string

Represents supported sort orders for listing nodes

func (NodeSortOrder) Valid

func (order NodeSortOrder) Valid() bool

Reports whether the sort order is accepted by the API

type NodeTags added in v1.1.0

type NodeTags struct {
	NodeUUID string   `json:"nodeUUID,omitempty"`
	Tags     []string `json:"tags,omitempty"`
	RawJSON  []byte   `json:"-"`
}

NodeTags represents the tags carried by a single node with the raw backend payload.

type NodeVerificationCheck added in v1.1.0

type NodeVerificationCheck string

Represents supported verification check filters for listing nodes

func (NodeVerificationCheck) Valid added in v1.1.0

func (check NodeVerificationCheck) Valid() bool

Reports whether the verification check status is accepted by the API

type NodeView

type NodeView string

Represents supported response shapes for listing nodes

func (NodeView) Valid

func (view NodeView) Valid() bool

Reports whether the view is accepted by the API

type NodesPage

type NodesPage struct {
	Nodes    []Node `json:"nodes"`
	HasMore  bool   `json:"hasMore"`
	Page     int    `json:"page"`
	PageSize int    `json:"pageSize"`
	Total    int    `json:"total"`
	RawJSON  []byte `json:"-"`
}

Represents a paginated node response with the raw backend payload

func (NodesPage) PageInfo added in v1.1.0

func (page NodesPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response.

type OOBChassis added in v1.1.0

type OOBChassis struct {
	AssetTag     string              `json:"assetTag,omitempty"`
	ChassisType  string              `json:"chassisType,omitempty"`
	Health       string              `json:"health,omitempty"`
	HealthRollup string              `json:"healthRollup,omitempty"`
	ID           string              `json:"id,omitempty"`
	Location     *OOBChassisLocation `json:"location,omitempty"`
	Manufacturer string              `json:"manufacturer,omitempty"`
	Model        string              `json:"model,omitempty"`
	ODataID      string              `json:"odataId,omitempty"`
	PartNumber   string              `json:"partNumber,omitempty"`
	PCIeDevices  []OOBPCIeDevice     `json:"pcieDevices,omitempty"`
	PowerState   string              `json:"powerState,omitempty"`
	SerialNumber string              `json:"serialNumber,omitempty"`
	SKU          string              `json:"sku,omitempty"`
	Status       *OOBInventoryStatus `json:"status,omitempty"`
	StatusState  string              `json:"statusState,omitempty"`
}

Represents a chassis reported by the BMC

type OOBChassisLocation added in v1.1.0

type OOBChassisLocation struct {
	Rack         string `json:"rack,omitempty"`
	RackOffset   *int   `json:"rackOffset,omitempty"`
	Room         string `json:"room,omitempty"`
	Row          string `json:"row,omitempty"`
	ServiceLabel string `json:"serviceLabel,omitempty"`
}

Represents the physical location of a chassis

type OOBDomainError added in v1.1.0

type OOBDomainError struct {
	Domain   string `json:"domain,omitempty"`
	Message  string `json:"message,omitempty"`
	Resource string `json:"resource,omitempty"`
}

Represents a collection error scoped to one OOB inventory domain

type OOBFirmware added in v1.1.0

type OOBFirmware struct {
	Health       string              `json:"health,omitempty"`
	HealthRollup string              `json:"healthRollup,omitempty"`
	ID           string              `json:"id,omitempty"`
	Name         string              `json:"name,omitempty"`
	ODataID      string              `json:"odataId,omitempty"`
	ReleaseDate  string              `json:"releaseDate,omitempty"`
	ServiceID    string              `json:"serviceId,omitempty"`
	Status       *OOBInventoryStatus `json:"status,omitempty"`
	StatusState  string              `json:"statusState,omitempty"`
	Version      string              `json:"version,omitempty"`
}

Represents a firmware inventory entry reported by the BMC

type OOBInventory added in v1.1.0

type OOBInventory struct {
	Chassis         []OOBChassis     `json:"chassis,omitempty"`
	CollectedAt     string           `json:"collectedAt"`
	DomainErrors    []OOBDomainError `json:"domainErrors,omitempty"`
	Firmware        []OOBFirmware    `json:"firmware,omitempty"`
	Managers        []OOBManager     `json:"managers,omitempty"`
	PrimarySystemID string           `json:"primarySystemId,omitempty"`
	SchemaVersion   string           `json:"schemaVersion"`
	Source          *OOBSource       `json:"source,omitempty"`
	Systems         []OOBSystem      `json:"systems,omitempty"`
	TargetError     string           `json:"targetError,omitempty"`
}

Represents inventory collected out of band through a node's BMC

type OOBInventoryCondition added in v1.1.1

type OOBInventoryCondition struct {
	ConditionType     string                 `json:"conditionType,omitempty"`
	Message           string                 `json:"message,omitempty"`
	MessageArgs       []string               `json:"messageArgs,omitempty"`
	MessageID         string                 `json:"messageId"`
	OriginOfCondition *OOBInventoryReference `json:"originOfCondition,omitempty"`
	Resolution        string                 `json:"resolution,omitempty"`
	Severity          string                 `json:"severity,omitempty"`
	Timestamp         string                 `json:"timestamp,omitempty"`
}

OOBInventoryCondition contains the details of one Redfish status condition.

type OOBInventoryReference added in v1.1.1

type OOBInventoryReference struct {
	ODataID string `json:"@odata.id"`
}

OOBInventoryReference identifies the Redfish resource associated with a condition.

type OOBInventoryStatus added in v1.1.1

type OOBInventoryStatus struct {
	Conditions   []OOBInventoryCondition `json:"conditions,omitempty"`
	Health       string                  `json:"health,omitempty"`
	HealthRollup string                  `json:"healthRollup,omitempty"`
	State        string                  `json:"state,omitempty"`
}

OOBInventoryStatus represents the Redfish status reported for an inventory resource.

type OOBManager added in v1.1.0

type OOBManager struct {
	FirmwareVersion string              `json:"firmwareVersion,omitempty"`
	Health          string              `json:"health,omitempty"`
	HealthRollup    string              `json:"healthRollup,omitempty"`
	ID              string              `json:"id,omitempty"`
	ManagerType     string              `json:"managerType,omitempty"`
	Model           string              `json:"model,omitempty"`
	ODataID         string              `json:"odataId,omitempty"`
	Status          *OOBInventoryStatus `json:"status,omitempty"`
	StatusState     string              `json:"statusState,omitempty"`
	UUID            string              `json:"uuid,omitempty"`
}

Represents a BMC manager

type OOBPCIeDevice added in v1.1.0

type OOBPCIeDevice struct {
	DeviceType      string              `json:"deviceType,omitempty"`
	FirmwareVersion string              `json:"firmwareVersion,omitempty"`
	Health          string              `json:"health,omitempty"`
	HealthRollup    string              `json:"healthRollup,omitempty"`
	ID              string              `json:"id,omitempty"`
	Manufacturer    string              `json:"manufacturer,omitempty"`
	Model           string              `json:"model,omitempty"`
	ODataID         string              `json:"odataId,omitempty"`
	PartNumber      string              `json:"partNumber,omitempty"`
	SerialNumber    string              `json:"serialNumber,omitempty"`
	SKU             string              `json:"sku,omitempty"`
	Status          *OOBInventoryStatus `json:"status,omitempty"`
	StatusState     string              `json:"statusState,omitempty"`
	UUID            string              `json:"uuid,omitempty"`
}

Represents a PCIe device reported by the BMC

type OOBProcessor added in v1.1.0

type OOBProcessor struct {
	Health                string              `json:"health,omitempty"`
	HealthRollup          string              `json:"healthRollup,omitempty"`
	ID                    string              `json:"id,omitempty"`
	InstructionSet        string              `json:"instructionSet,omitempty"`
	Manufacturer          string              `json:"manufacturer,omitempty"`
	MaxSpeedMHz           *int                `json:"maxSpeedMhz,omitempty"`
	Model                 string              `json:"model,omitempty"`
	ODataID               string              `json:"odataId,omitempty"`
	ProcessorArchitecture string              `json:"processorArchitecture,omitempty"`
	ProcessorType         string              `json:"processorType,omitempty"`
	Socket                string              `json:"socket,omitempty"`
	Status                *OOBInventoryStatus `json:"status,omitempty"`
	StatusState           string              `json:"statusState,omitempty"`
	TotalCores            *int                `json:"totalCores,omitempty"`
	TotalThreads          *int                `json:"totalThreads,omitempty"`
}

Represents a processor reported by the BMC

type OOBSource added in v1.1.0

type OOBSource struct {
	Address        string `json:"address,omitempty"`
	Hostname       string `json:"hostName,omitempty"`
	MAC            string `json:"mac,omitempty"`
	RedfishVersion string `json:"redfishVersion,omitempty"`
	ServiceUUID    string `json:"serviceUuid,omitempty"`
	SourceType     string `json:"sourceType,omitempty"`
	Vendor         string `json:"vendor,omitempty"`
}

Identifies the source used to collect OOB inventory

type OOBSystem added in v1.1.0

type OOBSystem struct {
	AssetTag          string              `json:"assetTag,omitempty"`
	BIOSVersion       string              `json:"biosVersion,omitempty"`
	CPUCoreCount      *int                `json:"cpuCoreCount,omitempty"`
	CPUCount          *int                `json:"cpuCount,omitempty"`
	CPUModel          string              `json:"cpuModel,omitempty"`
	Health            string              `json:"health,omitempty"`
	HealthRollup      string              `json:"healthRollup,omitempty"`
	Hostname          string              `json:"hostName,omitempty"`
	ID                string              `json:"id,omitempty"`
	Manufacturer      string              `json:"manufacturer,omitempty"`
	MemoryGiB         *float32            `json:"memoryGib,omitempty"`
	Model             string              `json:"model,omitempty"`
	ODataID           string              `json:"odataId,omitempty"`
	PowerState        string              `json:"powerState,omitempty"`
	Processors        []OOBProcessor      `json:"processors,omitempty"`
	SecureBootEnabled *bool               `json:"secureBootEnabled,omitempty"`
	SerialNumber      string              `json:"serialNumber,omitempty"`
	SKU               string              `json:"sku,omitempty"`
	Status            *OOBInventoryStatus `json:"status,omitempty"`
	StatusState       string              `json:"statusState,omitempty"`
	UUID              string              `json:"uuid,omitempty"`
}

Represents a computer system reported by the BMC

type Option

type Option func(*Client)

Customizes client construction behavior

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

Configures the HTTP client used for API requests. The client is used through a shallow copy carrying the redirect guard (see guardRedirect), so a client shared across callers is never mutated and its transport, cookie jar, and timeout are preserved.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

Sets the per-request timeout applied to API calls. The timeout is enforced via the request context rather than the HTTP client, so it is unaffected by WithHTTPClient (which replaces the HTTP client) and never mutates an *http.Client that may be shared across clients. Non-positive values are ignored, leaving the existing timeout in place.

type Overview

type Overview struct {
	NodesCount         *int             `json:"nodesCount,omitempty"`
	HealthyNodeCount   *int             `json:"healthNodeCount,omitempty"`
	DegradedNodeCount  *int             `json:"degradedNodeCount,omitempty"`
	UnhealthyNodeCount *int             `json:"unhealthyNodeCount,omitempty"`
	UnknownNodeCount   *int             `json:"unknownNodeCount,omitempty"`
	HealthPercentage   *float32         `json:"healthPercentage,omitempty"`
	NodeGroupCount     *int             `json:"nodeGroupCount,omitempty"`
	ComputeZoneCount   *int             `json:"computeZoneCount,omitempty"`
	GPUsCount          *int             `json:"gpusCount,omitempty"`
	CPUCoresCount      *int             `json:"cpuCoresCount,omitempty"`
	Metrics            []OverviewMetric `json:"metrics,omitempty"`
	RawJSON            []byte           `json:"-"`
}

Represents the overall system and fleet summary

type OverviewMetric

type OverviewMetric struct {
	Name        string   `json:"name,omitempty"`
	Description string   `json:"description,omitempty"`
	Unit        string   `json:"unit,omitempty"`
	Value       *float32 `json:"value,omitempty"`
	Aggregation string   `json:"aggregation,omitempty"`
	LastUpdated string   `json:"lastUpdated,omitempty"`
}

Represents a single fleet-level metric in the overview

type OverviewOptions

type OverviewOptions struct {
	// IncludeMetrics toggles the API's metrics payload. Nil uses the API
	// default (metrics included).
	IncludeMetrics *bool
}

Represents request options for fetching the fleet overview

type PageInfo added in v1.1.0

type PageInfo struct {
	Page     int
	PageSize int
	Total    int
	// HasMore is nil when the endpoint does not report it, which callers must
	// treat as "not reported" rather than as false. Every endpoint the SDK
	// exposes today reports or derives it, so this is a contract for endpoints
	// added later rather than a case any current response hits.
	HasMore *bool
	RawJSON []byte
}

PageInfo is the pagination envelope carried by every paginated list response. It lets a caller page through any list endpoint without restating the envelope once per response type.

type Paginated added in v1.1.0

type Paginated interface {
	PageInfo() PageInfo
}

Paginated is implemented by every paginated SDK list response.

type ReportFormat

type ReportFormat string

Represents supported report response formats

func (ReportFormat) Valid

func (format ReportFormat) Valid() bool

Reports whether the report format is accepted by the API

type RequestPreview added in v1.1.0

type RequestPreview struct {
	Method string
	URL    string
	Body   []byte
}

RequestPreview describes an HTTP request a write command would send, without sending it. --dry-run renders exactly this: the method, URL, and body bytes that would go over the wire, built through the same request construction the real call uses so the two can never disagree.

type SetNodeTagsOptions added in v1.1.0

type SetNodeTagsOptions struct {
	Tags []string
}

SetNodeTagsOptions represents request options for replacing a node's tags. Tags is the complete set the node should carry afterwards; an empty slice removes every tag.

type SortingDefaults added in v1.1.0

type SortingDefaults struct {
	Field string `json:"field"`
	Order string `json:"order"`
}

SortingDefaults reports the sort field and order applied when none is given.

type SortingOptions added in v1.1.0

type SortingOptions struct {
	Fields   []string        `json:"fields"`
	Orders   []string        `json:"orders"`
	Defaults SortingDefaults `json:"defaults"`
}

SortingOptions describes the supported sort fields, orders, and defaults.

type SuggestedAction

type SuggestedAction struct {
	Action  string `json:"action,omitempty"`
	Code    string `json:"code,omitempty"`
	Persona string `json:"persona,omitempty"`
	Type    string `json:"type,omitempty"`
}

Represents an operator action attached to an alert event

type SystemInfo

type SystemInfo struct {
	AgentVersion            string `json:"agentVersion,omitempty"`
	BootID                  string `json:"bootID,omitempty"`
	ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty"`
	CUDAVersion             string `json:"cudaVersion,omitempty"`
	DCGMVersion             string `json:"dcgmVersion,omitempty"`
	GPUDriverVersion        string `json:"gpuDriverVersion,omitempty"`
	Hostname                string `json:"hostname,omitempty"`
	KernelVersion           string `json:"kernelVersion,omitempty"`
	OperatingSystem         string `json:"operatingSystem,omitempty"`
	OSImage                 string `json:"osImage,omitempty"`
	StartedAt               string `json:"startedAt,omitempty"`
	SystemUUID              string `json:"systemUUID,omitempty"`
}

Represents system metadata reported by the node agent

type TagList

type TagList struct {
	Tags    []string `json:"tags,omitempty"`
	RawJSON []byte   `json:"-"`
}

TagList represents the unique customer tags with the raw backend payload

type TagListOptions

type TagListOptions struct {
	Prefix        string
	NodeUUID      string
	NodeGroupID   string
	ComputeZoneID string
}

TagListOptions represents request options for listing unique tags. At most one of NodeUUID, NodeGroupID, or ComputeZoneID may be set; Prefix may be combined with one resource filter.

type TimeRange

type TimeRange struct {
	Start string `json:"start,omitempty"`
	End   string `json:"end,omitempty"`
}

Represents an inclusive report time range

type UpdateComputeZoneOptions added in v1.1.0

type UpdateComputeZoneOptions struct {
	Type              *string
	ContactEmail      *string
	ContactPIC        *string
	LocationCity      *string
	LocationCountry   *string
	LocationRegion    *string
	LocationLatitude  *string
	LocationLongitude *string
}

UpdateComputeZoneOptions represents request options for updating a compute zone's metadata. Every field is optional: a nil field leaves the stored value alone. For the contact and location fields, a non-nil pointer to an empty string clears the stored value; Type has no such clear path and, if non-nil, must name a supported, non-empty type (see Validate). Compute zone names are agent-managed and cannot be set through the customer API, so there is no name option.

Coordinates are text rather than numbers for two reasons. The generated model decodes them as float32, so round-tripping a stored coordinate through it would rewrite the backend's value at float32 precision on every unrelated edit; and a numeric field has no value meaning "clear this".

func (UpdateComputeZoneOptions) Validate added in v1.1.0

func (opts UpdateComputeZoneOptions) Validate() error

Validate reports whether the options describe a request the API accepts. UpdateComputeZone calls it, and a caller can call it first to reject a bad request without opening a connection.

type VerificationCheckExtraInfo added in v1.1.0

type VerificationCheckExtraInfo struct {
	ErrorDetails             string               `json:"errorDetails,omitempty"`
	GPUEvidencePresent       *bool                `json:"gpuEvidencePresent,omitempty"`
	GPUResults               map[string]JWTClaims `json:"gpuResults,omitempty"`
	NRASCallResult           string               `json:"nrasCallResult,omitempty"`
	OverallAttestationResult *bool                `json:"overallAttestationResult,omitempty"`
}

Represents structured details returned with a verification check

type XIDBurst added in v1.1.0

type XIDBurst struct {
	BurstID                         string            `json:"burstId,omitempty"`
	NodeUUID                        string            `json:"nodeUuid,omitempty"`
	Hostname                        string            `json:"hostname,omitempty"`
	NodeGroup                       string            `json:"nodeGroup,omitempty"`
	NodeGroupID                     string            `json:"nodeGroupId,omitempty"`
	ComputeZone                     string            `json:"computeZone,omitempty"`
	ComputeZoneID                   string            `json:"computeZoneId,omitempty"`
	StartTime                       string            `json:"startTime,omitempty"`
	EndTime                         string            `json:"endTime,omitempty"`
	BurstDurationSeconds            *int              `json:"burstDurationSeconds,omitempty"`
	XIDCount                        *int              `json:"xidCount,omitempty"`
	XIDNumbers                      []XIDBurstXID     `json:"xidNumbers,omitempty"`
	DeviceIDs                       map[string][]int  `json:"deviceIds,omitempty"`
	JobDisruption                   *bool             `json:"jobDisruption,omitempty"`
	JobDisruptionDueToPlatformIssue *bool             `json:"jobDisruptionDueToPlatformIssue,omitempty"`
	Category                        string            `json:"category,omitempty"`
	Subcategory                     string            `json:"subcategory,omitempty"`
	StickyXIDsSuppressed            *int              `json:"stickyXidsSuppressed,omitempty"`
	SuggestedActions                []SuggestedAction `json:"suggestedActions,omitempty"`
}

XIDBurst represents one finalized XID burst. Fields are shaped server-side by the caller's persona: category, subcategory, platform-attributed disruption, XID descriptions, and DC-admin actions are omitted for tenant callers.

type XIDBurstDetails added in v1.1.0

type XIDBurstDetails struct {
	XIDBurst
	RawJSON []byte `json:"-"`
}

XIDBurstDetails represents one XID burst with the raw backend payload

type XIDBurstFilterOptions added in v1.1.0

type XIDBurstFilterOptions struct {
	XIDNumbers                      []int             `json:"xidNumbers"`
	Categories                      []string          `json:"categories"`
	Subcategories                   []string          `json:"subcategories"`
	JobDisruption                   []bool            `json:"jobDisruption"`
	JobDisruptionDueToPlatformIssue []bool            `json:"jobDisruptionDueToPlatformIssue"`
	SuggestedActions                []SuggestedAction `json:"suggestedActions"`
	RawJSON                         []byte            `json:"-"`
}

XIDBurstFilterOptions represents the filter values available when listing XID bursts. The XID endpoint returns per-field value lists rather than the shared filters/sorting envelope the node and alert endpoints use, and publishes no sorting metadata.

type XIDBurstFilterOptionsScope added in v1.1.0

type XIDBurstFilterOptionsScope struct {
	Window    string
	StartTime string
	EndTime   string

	NodeGroupIDs   []string
	ComputeZoneIDs []string

	// Exclusion filters select every assignment except the supplied IDs. Each
	// cannot be combined with the inclusive filter for the same dimension.
	ExcludeNodeGroupIDs   []string
	ExcludeComputeZoneIDs []string
}

XIDBurstFilterOptionsScope narrows the values an options lookup returns to those present in a time range and inventory scope. Every field is optional; the zero value asks for every value available to the caller. The time range follows the same rules as the burst list: a window selects a relative range, start and end select an absolute one, and the two cannot be combined.

The backend applies no table column filters here, so narrowing by anything other than these fields is not available.

type XIDBurstSortBy added in v1.1.0

type XIDBurstSortBy string

XIDBurstSortBy represents a sortable XID burst column

func (XIDBurstSortBy) Valid added in v1.1.0

func (sortBy XIDBurstSortBy) Valid() bool

Valid reports whether the sort field is accepted by the API

type XIDBurstSortOrder added in v1.1.0

type XIDBurstSortOrder string

XIDBurstSortOrder represents a sort direction for XID burst listings

func (XIDBurstSortOrder) Valid added in v1.1.0

func (order XIDBurstSortOrder) Valid() bool

Valid reports whether the sort order is accepted by the API

type XIDBurstXID added in v1.1.0

type XIDBurstXID struct {
	XIDNumber   *int   `json:"xidNumber,omitempty"`
	Mnemonic    string `json:"mnemonic,omitempty"`
	Description string `json:"description,omitempty"`
}

XIDBurstXID represents one XID number observed in a burst

type XIDBurstsPage added in v1.1.0

type XIDBurstsPage struct {
	Bursts   []XIDBurst `json:"items"`
	Page     int        `json:"page"`
	PageSize int        `json:"pageSize"`
	Total    int        `json:"total"`
	RawJSON  []byte     `json:"-"`
}

XIDBurstsPage represents a paginated XID burst list with the raw backend payload

func (XIDBurstsPage) PageInfo added in v1.1.0

func (page XIDBurstsPage) PageInfo() PageInfo

PageInfo reports the pagination envelope of the response. The XID burst endpoint sends no hasMore field, so it is derived from the counters.

Directories

Path Synopsis
Package verify checks the Sigstore signature on a signed Fleet Intelligence report.
Package verify checks the Sigstore signature on a signed Fleet Intelligence report.

Jump to

Keyboard shortcuts

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