autostart
package v2.28.4
Go to latest Published: Nov 27, 2025 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:15 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- type Config
- type Metrics
- func (m *Metrics) AddError(username string, action string)
- func (m *Metrics) RecordCompletion(elapsed time.Duration, username string, workspace string)
- func (m *Metrics) RecordJobAcquired(elapsed time.Duration, username string, workspace string)
- func (m *Metrics) RecordJobCreation(elapsed time.Duration, username string, workspace string)
- type Runner
Constants¶
View Source
const (AutostartTotalLatencyMetric = "autostart_total_latency_seconds"AutostartJobCreationLatencyMetric = "autostart_job_creation_latency_seconds"AutostartJobAcquiredLatencyMetric = "autostart_job_acquired_latency_seconds")
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeConfig¶
type Config struct {// User is the configuration for the user to create.Usercreateusers.Config `json:"user"`// Workspace is the configuration for the workspace to create. The workspace// will be built using the new user.//// OrganizationID is ignored and set to the new user's organization ID.Workspaceworkspacebuild.Config `json:"workspace"`// WorkspaceJobTimeout is how long to wait for any one workspace job// (start or stop) to complete.WorkspaceJobTimeouttime.Duration `json:"workspace_job_timeout"`// AutostartDelay is how long after all the workspaces have been stopped// to schedule them to be started again.AutostartDelaytime.Duration `json:"autostart_delay"`// AutostartTimeout is how long to wait for the autostart build to be// initiated after the scheduled time.AutostartTimeouttime.Duration `json:"autostart_timeout"`Metrics *Metrics `json:"-"`// SetupBarrier is used to ensure all runners own stopped workspaces// before setting the autostart schedule on each.SetupBarrier *sync.WaitGroup `json:"-"`}typeMetrics¶
type Metrics struct {AutostartJobCreationLatencySecondsprometheus.HistogramVecAutostartJobAcquiredLatencySecondsprometheus.HistogramVecAutostartTotalLatencySecondsprometheus.HistogramVecAutostartErrorsTotalprometheus.CounterVec}funcNewMetrics¶
func NewMetrics(regprometheus.Registerer) *Metrics
func (*Metrics)RecordCompletion¶
func (*Metrics)RecordJobAcquired¶
Click to show internal directories.
Click to hide internal directories.