Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// TemplateID is the template ID to use for creating the external workspace.
TemplateID uuid.UUID `json:"template_id"`
// WorkspaceName is the name for the external workspace to create.
WorkspaceName string `json:"workspace_name"`
// AppSlug is the slug of the app designated as the AI Agent.
AppSlug string `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.
ReportStatusPeriod time.Duration `json:"report_status_period"`
// Total time to report task statuses, starting from when we successfully read from the StartReporting channel.
ReportStatusDuration time.Duration `json:"report_status_duration"`
Metrics *Metrics `json:"-"`
MetricLabelValues []string `json:"metric_label_values"`
}
type Metrics ¶
type Metrics struct {
TaskStatusToWorkspaceUpdateLatencySeconds prometheus.HistogramVec
MissingStatusUpdatesTotal prometheus.CounterVec
ReportTaskStatusErrorsTotal prometheus.CounterVec
}
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer, labelNames ...string) *Metrics
Click to show internal directories.
Click to hide internal directories.