Movatterモバイル変換


[0]ホーム

URL:


workspaceupdates

package
v2.28.4Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License:AGPL-3.0Imports:21Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (WorkspaceUpdatesLatencyMetric = "workspace_updates_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"`// WorkspaceCount is the number of workspaces to create.WorkspaceCountint64 `json:"power_user_workspaces"`// WorkspaceUpdatesTimeout is how long to wait for all expected workspace updates.WorkspaceUpdatesTimeouttime.Duration `json:"workspace_updates_timeout"`// DialTimeout is how long to wait to successfully dial the Coder Connect// endpoint.DialTimeouttime.Duration `json:"dial_timeout"`Metrics *Metrics `json:"-"`// DialBarrier is used to ensure all runners have dialed the Coder Connect// endpoint before creating their workspace(s).DialBarrier *sync.WaitGroup `json:"-"`}

func (Config)Validate

func (cConfig) Validate()error

typeMetrics

type Metrics struct {WorkspaceUpdatesLatencySecondsprometheus.HistogramVecWorkspaceUpdatesErrorsTotalprometheus.CounterVec}

funcNewMetrics

func NewMetrics(regprometheus.Registerer) *Metrics

func (*Metrics)AddError

func (m *Metrics) AddError(usernamestring, ownedWorkspacesint64, actionstring)

func (*Metrics)RecordCompletion

func (m *Metrics) RecordCompletion(elapsedtime.Duration, usernamestring, ownedWorkspacesint64, workspacestring)

typeRunner

type Runner struct {// contains filtered or unexported fields}

funcNewRunner

func NewRunner(client *codersdk.Client, cfgConfig) *Runner

func (*Runner)Cleanup

func (r *Runner) Cleanup(ctxcontext.Context, idstring, logsio.Writer)error

func (*Runner)GetMetrics

func (r *Runner) GetMetrics() map[string]any

func (*Runner)Run

func (r *Runner) Run(ctxcontext.Context, idstring, logsio.Writer)error

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp