service

package
v0.19.1069 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: AGPL-3.0 Imports: 61 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(params Params) (*service, error)

Types

type AggregatedQuery added in v0.19.915

type AggregatedQuery struct {
	SQL             string  `json:"sql" gorm:"column:sql"`
	Table           string  `json:"table" gorm:"column:agg_table"`
	Operation       string  `json:"operation" gorm:"column:agg_operation"`
	DBType          string  `json:"db_type" gorm:"column:agg_db_type"`
	Source          string  `json:"source" gorm:"column:agg_source"`
	Endpoint        string  `json:"endpoint" gorm:"column:agg_endpoint"`
	Count           int     `json:"count" gorm:"column:cnt"`
	TotalMS         float64 `json:"total_ms" gorm:"column:total_ms"`
	AvgMS           float64 `json:"avg_ms" gorm:"column:avg_ms"`
	MinMS           float64 `json:"min_ms" gorm:"column:min_ms"`
	MaxMS           float64 `json:"max_ms" gorm:"column:max_ms"`
	TotalRows       int64   `json:"total_rows" gorm:"column:total_rows"`
	MaxRows         int64   `json:"max_rows" gorm:"column:max_rows"`
	MaxResponseSize int     `json:"max_response_size" gorm:"column:max_response_size"`
	LastError       string  `json:"last_error,omitempty" gorm:"column:agg_last_error"`
	Caller          string  `json:"caller" gorm:"column:agg_caller"`
	CallerURL       string  `json:"caller_url,omitempty" gorm:"column:agg_caller_url"`
	LastSeenAt      string  `json:"last_seen_at" gorm:"column:last_seen_at"`
}

AggregatedQuery groups all executions of the same SQL statement.

type AuditLogEntry added in v0.19.913

type AuditLogEntry struct {
	EntityType  string    `json:"entity_type"`
	EntityID    string    `json:"entity_id"`
	EntityName  string    `json:"entity_name"`
	CreatedAt   time.Time `json:"created_at"`
	OrgID       *string   `json:"org_id"`
	OrgName     *string   `json:"org_name"`
	AppID       *string   `json:"app_id"`
	AppName     *string   `json:"app_name"`
	Description *string   `json:"description"`
}

AuditLogEntry represents a single audit log entry for account or install activity.

type CatalogQuery added in v0.19.915

type CatalogQuery struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	SQL         string `json:"sql"`
	DBType      string `json:"db_type"` // "psql" or "ch"
}

CatalogQuery is a pre-defined SQL query that can be run from the admin dashboard.

type InstallUptimeEntry added in v0.19.915

type InstallUptimeEntry struct {
	InstallID   string `json:"install_id"`
	InstallName string `json:"install_name"`
	OrgID       string `json:"org_id"`
	OrgName     string `json:"org_name"`

	RunnerCreatedAt string `json:"runner_created_at,omitempty"`

	InstallProcesses []ProcessUptime `json:"install_processes"`
	MngProcesses     []ProcessUptime `json:"mng_processes"`

	InstallMetrics UptimeMetrics `json:"install_metrics"`
	MngMetrics     UptimeMetrics `json:"mng_metrics"`

	Jobs JobSummary `json:"jobs"`
}

InstallUptimeEntry groups all runner data for a single install.

type JobSummary added in v0.19.915

type JobSummary struct {
	Total     int64 `json:"total"`
	Finished  int64 `json:"finished"`
	Failed    int64 `json:"failed"`
	TimedOut  int64 `json:"timed_out"`
	Cancelled int64 `json:"cancelled"`
	Other     int64 `json:"other"`
}

type LabelSearchResult added in v0.19.894

type LabelSearchResult = views.LabelSearchResult

LabelSearchResult represents a single entity with labels for the browse page.

type Params

type Params struct {
	fx.In
	V   *validator.Validate
	Cfg *internal.Config
	DB  *gorm.DB `name:"psql"`
	// optional because non-admin-dashboard binaries instantiate this service
	// via sharedServices but don't provide a replica.
	ReplicaDB      *gorm.DB `name:"psql-replica" optional:"true"`
	CHDB           *gorm.DB `name:"ch"`
	MW             metrics.Writer
	L              *zap.Logger
	AppsHelpers    *appshelpers.Helpers
	AcctClient     *account.Client
	AuthzClient    *authz.Client
	OrgsHelpers    *orgshelpers.Helpers
	RunnersHelpers *runnershelpers.Helpers
	TemporalClient temporalclient.Client
	QueueClient    *queueclient.Client
	EmitterClient  *emitterclient.Client
	Enqueuer       *enqueuer.Enqueuer

	TemporalCodecGzip         converter.PayloadCodec `name:"gzip"`
	TemporalCodecLargePayload converter.PayloadCodec `name:"largepayload"`
	TemporalCodecBlob         converter.PayloadCodec `name:"blob"`

	QueryCollector *querycollector.Collector
}

type ProcessUptime added in v0.19.915

type ProcessUptime struct {
	ProcessID       string  `json:"process_id"`
	RunnerID        string  `json:"runner_id"`
	Type            string  `json:"type"`
	Status          string  `json:"status"`
	Version         string  `json:"version"`
	StartedAt       string  `json:"started_at,omitempty"`
	LastHeartbeat   string  `json:"last_heartbeat,omitempty"`
	UptimeMS        float64 `json:"uptime_ms"`
	UptimeStr       string  `json:"uptime_str"`
	Heartbeats      int64   `json:"heartbeats"`
	HealthChecks    int64   `json:"health_checks"`
	HealthyChecks   int64   `json:"healthy_checks"`
	UnhealthyChecks int64   `json:"unhealthy_checks"`
}

type Service

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

type SignalGraphNode added in v0.19.913

type SignalGraphNode struct {
	Signal       *app.QueueSignal    `json:"signal"`
	WorkflowInfo *views.WorkflowInfo `json:"workflow_info,omitempty"`
	Children     []SignalGraphNode   `json:"children,omitempty"`
	Relationship string              `json:"relationship,omitempty"` // "awaited" or "enqueued"
}

SignalGraphNode represents one signal in the recursive graph.

type UptimeMetrics added in v0.19.915

type UptimeMetrics struct {
	// Effective window (adjusted if runner created after window start).
	EffectiveWindowMS float64 `json:"effective_window_ms"`
	TotalUptimeMS     float64 `json:"total_uptime_ms"`
	TotalProcs        int     `json:"total_procs"`
	Restarts          int     `json:"restarts"`

	TotalHeartbeats      int64 `json:"total_heartbeats"`
	ExpectedHeartbeats   int64 `json:"expected_heartbeats"`
	TotalHealthChecks    int64 `json:"total_health_checks"`
	HealthyChecks        int64 `json:"healthy_checks"`
	UnhealthyChecks      int64 `json:"unhealthy_checks"`
	ExpectedHealthChecks int64 `json:"expected_health_checks"`
}

UptimeMetrics holds aggregate numbers for the pie charts.

type WorkflowIndexEntry added in v0.19.934

type WorkflowIndexEntry struct {
	WorkflowID       string            `json:"workflow_id"`
	RunID            string            `json:"run_id"`
	WorkflowType     string            `json:"workflow_type"`
	Namespace        string            `json:"namespace"`
	Status           string            `json:"status"`
	StartTime        string            `json:"start_time"`
	HistoryLength    int64             `json:"history_length"`
	HistorySizeBytes int64             `json:"history_size_bytes"`
	CANCount         int64             `json:"can_count"`
	Memo             map[string]string `json:"memo,omitempty"`
	IsQueue          bool              `json:"is_queue"`
	QueueID          string            `json:"queue_id,omitempty"`
	Link             string            `json:"link,omitempty"`
}

WorkflowIndexEntry is a single workflow in the index response.

type WorkflowStats added in v0.19.934

type WorkflowStats struct {
	HistoryLength    int64  `json:"history_length"`
	HistorySizeBytes int64  `json:"history_size_bytes"`
	CANCount         int64  `json:"can_count"`
	StartTime        string `json:"start_time"`
	Status           string `json:"status"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL