Movatterモバイル変換


[0]ホーム

URL:


taskstatus

package
v2.29.1Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License:AGPL-3.0Imports:18Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeConfig

type Config struct {// TemplateID is the template ID to use for creating the external workspace.TemplateIDuuid.UUID `json:"template_id"`// WorkspaceName is the name for the external workspace to create.WorkspaceNamestring `json:"workspace_name"`// AppSlug is the slug of the app designated as the AI Agent.AppSlugstring `json:"app_slug"`// When the runner has connected to the watch-ws endpoint, it will call Done once on this wait group. Used to// coordinate multiple runners from the higher layer.ConnectedWaitGroup *sync.WaitGroup `json:"-"`// We read on this channel before starting to report task statuses. Used to coordinate multiple runners from the// higher layer.StartReporting chan struct{} `json:"-"`// Time between reporting task statuses.ReportStatusPeriodtime.Duration `json:"report_status_period"`// Total time to report task statuses, starting from when we successfully read from the StartReporting channel.ReportStatusDurationtime.Duration `json:"report_status_duration"`Metrics           *Metrics `json:"-"`MetricLabelValues []string `json:"metric_label_values"`}

func (*Config)Validate

func (c *Config) Validate()error

typeMetrics

type Metrics struct {TaskStatusToWorkspaceUpdateLatencySecondsprometheus.HistogramVecMissingStatusUpdatesTotalprometheus.CounterVecReportTaskStatusErrorsTotalprometheus.CounterVec}

funcNewMetrics

func NewMetrics(regprometheus.Registerer, labelNames ...string) *Metrics

typeRunner

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

funcNewRunner

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

NewRunner creates a new Runner with the provided codersdk.Client and configuration.

func (*Runner)Cleanup

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

Cleanup deletes the external workspace created by this runner.

func (*Runner)Run

func (r *Runner) Run(ctxcontext.Context, namestring, 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