service

package
v0.19.921 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 52 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"`
	Table       string  `json:"table"`
	Operation   string  `json:"operation"`
	DBType      string  `json:"db_type"`
	Source      string  `json:"source"`
	Endpoint    string  `json:"endpoint"`
	Count       int     `json:"count"`
	TotalMS     float64 `json:"total_ms"`
	AvgMS       float64 `json:"avg_ms"`
	MinMS       float64 `json:"min_ms"`
	MaxMS       float64 `json:"max_ms"`
	TotalRows   int64   `json:"total_rows"`
	MaxRows     int64   `json:"max_rows"`
	MaxRespSize int     `json:"max_response_size"`
	LastError   string  `json:"last_error,omitempty"`
	Caller      string  `json:"caller"`
	LastSeenAt  string  `json:"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
	TemporalClient temporalclient.Client
	QueueClient    *queueclient.Client
	EmitterClient  *emitterclient.Client

	TemporalCodecGzip         converter.PayloadCodec `name:"gzip"`
	TemporalCodecLargePayload converter.PayloadCodec `name:"largepayload"`
	TemporalCodecS3Payload    converter.PayloadCodec `name:"s3payload"`

	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"` // awaited signals, recursively resolved
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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