controlplane

package
v0.19.1303 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: AGPL-3.0 Imports: 41 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeartbeatUntilDone

func HeartbeatUntilDone(ctx context.Context, heartbeat func()) func()

Types

type Client

type Client interface {
	GetJob(ctx context.Context, jobID string) (*models.AppRunnerJob, error)
	GetJobPlanJSON(ctx context.Context, jobID string) (string, error)
	GetJobCompositePlan(ctx context.Context, jobID string) (*models.PlantypesCompositePlan, error)
	UpdateJobExecution(ctx context.Context, jobID, executionID string, req *models.ServiceUpdateRunnerJobExecutionRequest) (*models.AppRunnerJobExecution, error)
	CreateJobExecutionResult(ctx context.Context, jobID, executionID string, req *models.ServiceCreateRunnerJobExecutionResultRequest) (*models.AppRunnerJobExecutionResult, error)
	CreateJobExecutionOutputs(ctx context.Context, jobID, executionID string, req *models.ServiceCreateRunnerJobExecutionOutputsRequest) (*models.AppRunnerJobExecutionOutputs, error)
	WriteControlPlaneLogs(ctx context.Context, logStreamID string, records []OTELLogRecord) error
	WriteControlPlaneTraces(ctx context.Context, runnerID string, records []OTELTraceRecord) error
}

type Config

type Config struct {
	GitRef                   string
	BundleDir                string
	RegistryDir              string
	RegistryPort             int
	LogLevel                 string
	TerraformMirrorPlatforms []string
}

type Executor

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

func NewExecutor

func NewExecutor(client Client, l *zap.Logger, cfg Config) (*Executor, error)

func (*Executor) Execute

func (e *Executor) Execute(ctx context.Context, job *models.AppRunnerJob, execution *models.AppRunnerJobExecution) error

type OTELLogRecord

type OTELLogRecord struct {
	RunnerID               string
	RunnerGroupID          string
	RunnerJobID            string
	RunnerJobExecutionID   string
	RunnerJobExecutionStep string
	ResourceAttributes     map[string]string
	ResourceSchemaURL      string
	ScopeSchemaURL         string
	ScopeName              string
	ScopeVersion           string
	ScopeAttributes        map[string]string
	Timestamp              time.Time
	ServiceName            string
	SeverityNumber         int
	SeverityText           string
	Body                   string
	TraceID                string
	SpanID                 string
	TraceFlags             int
	LogAttributes          map[string]string
}

type OTELTraceRecord

type OTELTraceRecord struct {
	RunnerID               string
	RunnerGroupID          string
	RunnerJobID            string
	RunnerJobExecutionID   string
	RunnerJobExecutionStep string
	Timestamp              time.Time
	ResourceAttributes     map[string]string
	ResourceSchemaURL      string
	ScopeSchemaURL         string
	ScopeName              string
	ScopeVersion           string
	ScopeAttributes        map[string]string
	TraceID                string
	SpanID                 string
	ParentSpanID           string
	TraceState             string
	SpanName               string
	SpanKind               string
	ServiceName            string
	SpanAttributes         map[string]string
	Duration               int64
	StatusCode             string
	StatusMessage          string
	EventsTimestamp        []time.Time
	EventsName             []string
	EventsAttributes       []map[string]string
	LinksTraceID           []string
	LinksSpanID            []string
	LinksState             []string
	LinksAttributes        []map[string]string
}

Jump to

Keyboard shortcuts

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