Documentation
¶
Overview ¶
Package backendclient provides the agent-facing client for backend workflows.
Index ¶
- Variables
- type AgentConfig
- type AttestationData
- type AttestationRequest
- type AttestationSDKResponse
- type BlockDevice
- type CPUInfo
- type Client
- type DiskInfo
- type EvidenceItem
- type GPUDevice
- type GPUInfo
- type HTTPStatusError
- type MemoryInfo
- type NICInfo
- type NICInterface
- type NodeResources
- type NodeUpsertRequest
- type NonceResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("backend client not implemented")
ErrNotImplemented is returned by skeleton backend client methods.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
TotalComponents int64 `json:"totalComponents"`
RetentionPeriodSeconds int64 `json:"retentionPeriodSeconds"`
MetricScrapeIntervalSeconds int64 `json:"metricScrapeIntervalSeconds"`
EnabledComponents []string `json:"enabledComponents"`
DisabledComponents []string `json:"disabledComponents"`
InventoryEnabled bool `json:"inventoryEnabled"`
InventoryIntervalSeconds int64 `json:"inventoryIntervalSeconds"`
AttestationEnabled bool `json:"attestationEnabled"`
AttestationIntervalSeconds int64 `json:"attestationIntervalSeconds"`
}
type AttestationData ¶
type AttestationData struct {
SDKResponse AttestationSDKResponse `json:"sdkResponse"`
NonceRefreshTimestamp time.Time `json:"nonceRefreshTimestamp"`
Success bool `json:"success"`
ErrorMessage string `json:"errorMessage,omitempty"`
}
type AttestationRequest ¶
type AttestationRequest struct {
AttestationData AttestationData `json:"attestationData"`
}
AttestationRequest is the backend DTO for attestation submission.
type AttestationSDKResponse ¶
type AttestationSDKResponse struct {
Evidences []EvidenceItem `json:"evidences"`
ResultCode int `json:"resultCode"`
ResultMessage string `json:"resultMessage"`
}
type BlockDevice ¶
type Client ¶
type Client interface {
Enroll(ctx context.Context, sakToken string) (jwt string, err error)
UpsertNode(ctx context.Context, nodeUUID string, req *NodeUpsertRequest, jwt string) error
GetNonce(ctx context.Context, nodeUUID string, jwt string) (*NonceResponse, error)
SubmitAttestation(ctx context.Context, nodeUUID string, req *AttestationRequest, jwt string) error
}
Client is the backend workflow client used by enrollment, inventory, and attestation paths.
type DiskInfo ¶
type DiskInfo struct {
ContainerRootDisk string `json:"containerRootDisk"`
BlockDevices []BlockDevice `json:"blockDevices"`
}
type EvidenceItem ¶
type HTTPStatusError ¶
HTTPStatusError captures a non-2xx backend response.
func (*HTTPStatusError) Error ¶
func (e *HTTPStatusError) Error() string
type MemoryInfo ¶
type MemoryInfo struct {
TotalBytes string `json:"totalBytes"`
}
type NICInfo ¶
type NICInfo struct {
PrivateIPInterfaces []NICInterface `json:"privateIPInterfaces"`
}
type NICInterface ¶
type NodeResources ¶
type NodeResources struct {
CPUInfo CPUInfo `json:"cpuInfo"`
MemoryInfo MemoryInfo `json:"memoryInfo"`
GPUInfo GPUInfo `json:"gpuInfo"`
DiskInfo DiskInfo `json:"diskInfo"`
NICInfo NICInfo `json:"nicInfo"`
}
type NodeUpsertRequest ¶
type NodeUpsertRequest struct {
Hostname string `json:"hostname"`
AgentConfig AgentConfig `json:"agentConfig,omitempty"`
Resources NodeResources `json:"resources"`
AgentVersion string `json:"agentVersion"`
GPUDriverVersion string `json:"gpuDriverVersion"`
CUDAVersion string `json:"cudaVersion"`
DCGMVersion string `json:"dcgmVersion"`
ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
KernelVersion string `json:"kernelVersion"`
OSImage string `json:"osImage"`
OperatingSystem string `json:"operatingSystem"`
SystemUUID string `json:"systemUUID"`
MachineID string `json:"machineId"`
BootID string `json:"bootID"`
Uptime *time.Time `json:"uptime,omitempty"`
EnrolledAt *time.Time `json:"enrolledAt,omitempty"`
NetPrivateIP string `json:"netPrivateIP,omitempty"`
NodeGroup string `json:"nodeGroup"`
ComputeZone string `json:"computeZone"`
}
NodeUpsertRequest is the backend DTO for node inventory upserts.
Click to show internal directories.
Click to hide internal directories.