Documentation
¶
Overview ¶
Package attestation provides functionality for GPU attestation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttestationData ¶
type AttestationData struct {
SDKResponse AttestationSDKResponse `json:"sdk_response"`
NonceRefreshTimestamp time.Time `json:"nonce_refresh_timestamp"`
Success bool `json:"success"`
ErrorMessage string `json:"error_message,omitempty"`
}
AttestationData represents the complete attestation information including SDK response and timestamp
type AttestationSDKResponse ¶
type AttestationSDKResponse struct {
Evidences []EvidenceItem `json:"evidences"`
ResultCode int `json:"result_code"`
ResultMessage string `json:"result_message"`
}
AttestationSDKResponse represents the complete response from the attestation SDK
type EvidenceItem ¶
type EvidenceItem struct {
Arch string `json:"arch"`
Certificate string `json:"certificate"`
DriverVersion string `json:"driver_version"`
Evidence string `json:"evidence"`
Nonce string `json:"nonce"`
VBIOSVersion string `json:"vbios_version"`
Version string `json:"version"`
}
EvidenceItem represents a single evidence item from the attestation SDK
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages the attestation process with configurable intervals
func NewManager ¶
func NewManager(ctx context.Context, nvmlInstance nvidianvml.Instance, config *config.AttestationConfig) *Manager
NewManager creates a new attestation manager
func (*Manager) GetAttestationData ¶
func (m *Manager) GetAttestationData() *AttestationData
GetAttestationData returns the current attestation data directly
func (*Manager) IsAttestationDataUpdated ¶
IsAttestationDataUpdated checks if attestation data has been updated since the given time
func (*Manager) Start ¶
func (m *Manager) Start()
Start begins the attestation loop with jitter to prevent thundering herd Uses dynamic intervals: shorter retry interval when not enrolled, normal interval otherwise
func (*Manager) Stop ¶
func (m *Manager) Stop()
Stop gracefully shuts down the attestation manager and waits for the background goroutine to exit. This ensures that any in-progress call to defaultStateFileFn (or any other shared state) finishes before Stop returns, which prevents data races in tests and orderly cleanup in production.