Versions in this module Expand all Collapse all v0 v0.6.2 Oct 27, 2026 v0.6.1 Oct 24, 2026 Changes in this version + const ReasonAheadOfTarget + const ReasonNoDigestForInstalled + const ReasonNoDigestForTarget + const ReasonNoTarget + const ReasonRolloutPaused + const ReasonRolloutPending + const ReasonUnsupportedPlatform + const RolloutAborted + const RolloutCompleted + const RolloutPaused + const RolloutRunning + const RolloutStageWait + var ErrInUse = errors.New("osquery version is in use by a target or pin") + var ErrInvalid = errors.New("invalid osquery version input") + var ErrNotFound = errors.New("osquery version not found") + var ErrRolloutState = errors.New("rollout is not in a state that allows this") + var RolloutStages = [4]uint32 + func Bucket(envID uint, version, nodeUUID string) uint32 + func CleanHost(s string) string + func Compare(a, b string) (int, error) + func ComputeThresholds(envID uint, version string, uuids []string) [4]uint32 + func HostName(names ...string) string + func NodePlatformSupported(platform string) bool + func SupportedNodePlatformSQL(column string) string + func ValidEntry(platform, arch, format, sha256 string) error + func ValidVersion(v string) bool + type DigestEntry struct + Arch string + CreatedAt time.Time + CreatedBy string + Format string + ID uint + Platform string + SHA256 string + Version string + func (DigestEntry) TableName() string + type EnvTarget struct + EnvironmentID uint + RequestID string + UpdatedBy string + Version string + func (EnvTarget) TableName() string + type Manager struct + func NewManager(db *gorm.DB) (*Manager, error) + func (m *Manager) AbortRollout(envID uint, by string, now time.Time) (*Rollout, error) + func (m *Manager) ClearEnvTarget(envID uint) (bool, error) + func (m *Manager) CountBehind(now time.Time, fresh time.Duration) (map[uint]int, error) + func (m *Manager) CountPaused() (map[uint]int, error) + func (m *Manager) DeleteNodeRecords(nodeUUID string) error + func (m *Manager) DeletePin(nodeUUID string) (bool, error) + func (m *Manager) DeleteVersion(version string) error + func (m *Manager) GetEntries(version string) ([]DigestEntry, error) + func (m *Manager) GetEnvTarget(envID uint) (*EnvTarget, error) + func (m *Manager) GetPin(nodeUUID string) (*NodePin, error) + func (m *Manager) GetRollout(envID uint) (*Rollout, error) + func (m *Manager) ListVersions() ([]VersionView, error) + func (m *Manager) PauseRollout(envID uint, requestID, host, reason string, eventAt, now time.Time) (bool, error) + func (m *Manager) Progress(r Rollout, now time.Time) (RolloutProgress, error) + func (m *Manager) PutEntries(version string, entries []DigestEntry, by string) error + func (m *Manager) Resolve(in ResolveInput, now time.Time) (Resolution, error) + func (m *Manager) ResumeRollout(envID uint, by string, now time.Time) (*Rollout, error) + func (m *Manager) SetEnvTarget(envID uint, version, by string) (*EnvTarget, error) + func (m *Manager) SetEnvTargetRollout(envID uint, version, by string, uuids []string, now time.Time) (*EnvTarget, *Rollout, error) + func (m *Manager) SetPin(nodeUUID string, envID uint, version string, expiresAt *time.Time, by string) (*NodePin, error) + func (m *Manager) VersionNames() ([]string, error) + type NodePin struct + EnvironmentID uint + ExpiresAt *time.Time + NodeUUID string + RequestID string + UpdatedBy string + Version string + func (NodePin) TableName() string + func (p NodePin) Expired(now time.Time) bool + type Ref struct + SHA256 string + Version string + type Resolution struct + Previous *Ref + Reason string + RequestID string + Source string + Target *Ref + type ResolveInput struct + Arch string + EnvironmentID uint + Format string + InstalledVersion string + NodeUUID string + Platform string + type RolledBackHost struct + At time.Time + Host string + Reason string + type Rollout struct + AbortedAt *time.Time + AbortedBy string + CreatedBy string + EnvironmentID uint + PausedAt *time.Time + PausedHost string + PausedReason string + RequestID string + ResumedAt *time.Time + ResumedBy string + Stage int + StageOpenedAt time.Time + State string + Thresholds string + Version string + func (Rollout) TableName() string + func (r Rollout) EffectiveStage(now time.Time) int + func (r Rollout) EffectiveState(now time.Time) string + func (r Rollout) Eligible(bucket uint32, now time.Time) bool + func (r Rollout) NextStageAt(now time.Time) *time.Time + func (r Rollout) NodeStage(bucket uint32) int + type RolloutCounts struct + Eligible int + RolledBack int + Upgraded int + Waiting int + type RolloutProgress struct + Counts RolloutCounts + NextStageAt *time.Time + RolledBackHosts []RolledBackHost + Rollout Rollout + Stage int + State string + type VersionView struct + Entries []DigestEntry + InUse bool + Version string