Documentation
¶
Index ¶
- Constants
- Variables
- type Body
- type BootstrapRequest
- type BootstrapResponse
- type Op
- type OpOption
- func WithAuditLogger(auditLogger log.AuditLogger) OpOption
- func WithAutoUpdateExitCode(autoUpdateExitCode int) OpOption
- func WithComponentsRegistry(componentsRegistry components.Registry) OpOption
- func WithDBInMemory(dbInMemory bool) OpOption
- func WithDataDir(dataDir string) OpOption
- func WithEnableAutoUpdate(enableAutoUpdate bool) OpOption
- func WithFaultInjector(faultInjector pkgfaultinjector.Injector) OpOption
- func WithMachineID(machineID string) OpOption
- func WithMetricsStore(metricsStore pkgmetrics.Store) OpOption
- func WithNvidiaInstance(nvmlInstance nvidianvml.Instance) OpOption
- func WithPipeInterval(t time.Duration) OpOption
- func WithSavePluginSpecsFunc(...) OpOption
- func WithSkipUpdateConfig(skip bool) OpOption
- type Request
- type Response
- type Session
Constants ¶
View Source
const (
DefaultQuerySince = 30 * time.Minute
)
Variables ¶
View Source
var ErrAutoUpdateDisabledButExitCodeSet = errors.New("auto update is disabled but auto update by exit code is set")
Functions ¶
This section is empty.
Types ¶
type BootstrapRequest ¶ added in v0.5.0
type BootstrapRequest struct {
// TimeoutInSeconds is the timeout for the bootstrap script.
// If not set, the default timeout is 10 seconds.
TimeoutInSeconds int `json:"timeout_in_seconds,omitempty"`
// ScriptBase64 is the base64 encoded script to run.
ScriptBase64 string `json:"script_base64,omitempty"`
}
type BootstrapResponse ¶ added in v0.5.0
type OpOption ¶
type OpOption func(*Op)
func WithAuditLogger ¶ added in v0.5.0
func WithAuditLogger(auditLogger log.AuditLogger) OpOption
func WithAutoUpdateExitCode ¶
Triggers an auto update of GPUd itself by exiting the process with the given exit code. Useful when the machine is managed by the Kubernetes daemonset and we want to trigger an auto update when the daemonset restarts the machine.
func WithComponentsRegistry ¶ added in v0.5.0
func WithComponentsRegistry(componentsRegistry components.Registry) OpOption
func WithDBInMemory ¶ added in v0.9.0
func WithDataDir ¶ added in v0.9.0
func WithEnableAutoUpdate ¶
func WithFaultInjector ¶ added in v0.5.0
func WithFaultInjector(faultInjector pkgfaultinjector.Injector) OpOption
func WithMachineID ¶
func WithMetricsStore ¶ added in v0.5.0
func WithMetricsStore(metricsStore pkgmetrics.Store) OpOption
func WithNvidiaInstance ¶ added in v0.5.0
func WithNvidiaInstance(nvmlInstance nvidianvml.Instance) OpOption
func WithPipeInterval ¶
func WithSavePluginSpecsFunc ¶ added in v0.5.0
func WithSkipUpdateConfig ¶ added in v0.9.0
WithSkipUpdateConfig skips processing updateConfig session requests when true.
type Request ¶
type Request struct {
Method string `json:"method,omitempty"`
Components []string `json:"components,omitempty"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Since time.Duration `json:"since"`
UpdateVersion string `json:"update_version,omitempty"`
UpdateConfig map[string]string `json:"update_config,omitempty"`
Bootstrap *BootstrapRequest `json:"bootstrap,omitempty"`
InjectFaultRequest *pkgfaultinjector.Request `json:"inject_fault_request,omitempty"`
// ComponentName is the name of the component to query or deregister.
ComponentName string `json:"component_name,omitempty"`
// TagName is the tag of the component to trigger check.
// Optional. If set, it triggers all the component checks
// that match this tag value.
TagName string `json:"tag_name,omitempty"`
// CustomPluginSpecs is the specs for the custom plugins to register or overwrite.
CustomPluginSpecs pkgcustomplugins.Specs `json:"custom_plugin_specs,omitempty"`
}
Request is the request from the control plane to GPUd.
type Response ¶
type Response struct {
// Error is the error message from session processor.
// don't use "error" type as it doesn't marshal/unmarshal well
Error string `json:"error,omitempty"`
// ErrorCode is the error code from session processor.
// It uses the same semantics as the HTTP status code.
// See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
ErrorCode int32 `json:"error_code,omitempty"`
GossipRequest *apiv1.GossipRequest `json:"gossip_request,omitempty"`
States apiv1.GPUdComponentHealthStates `json:"states,omitempty"`
Events apiv1.GPUdComponentEvents `json:"events,omitempty"`
Metrics apiv1.GPUdComponentMetrics `json:"metrics,omitempty"`
Bootstrap *BootstrapResponse `json:"bootstrap,omitempty"`
PackageStatus []apiv1.PackageStatus `json:"package_status,omitempty"`
// CustomPluginSpecs lists the specs for the custom plugins.
CustomPluginSpecs pkgcustomplugins.Specs `json:"custom_plugin_specs,omitempty"`
}
Response is the response from GPUd to the control plane.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package states provides tracking of login success and failure events as well as the state of ongoing session loops (token expiration, etc.).
|
Package states provides tracking of login success and failure events as well as the state of ongoing session loops (token expiration, etc.). |
Click to show internal directories.
Click to hide internal directories.