process

package
v0.19.916 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	fx.In

	APIClient  nuonrunner.Client
	Cfg        *internal.Config
	LC         fx.Lifecycle
	Settings   *settings.Settings
	Shutdowner fx.Shutdowner
	Process    string `name:"process"`
}

type Registrar

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

func (*Registrar) LogProvider

func (r *Registrar) LogProvider() *otellog.LoggerProvider

LogProvider returns the OTEL log provider for the process log stream.

func (*Registrar) LogStreamID

func (r *Registrar) LogStreamID() string

func (*Registrar) ProcessID

func (r *Registrar) ProcessID() string

func (*Registrar) TracerProvider added in v0.19.915

func (r *Registrar) TracerProvider() oteltrace.TracerProvider

TracerProvider returns the process-scoped OTEL TracerProvider, falling back to the global if none was created. Callers should prefer this over otel.GetTracerProvider() because transitive deps (e.g. the docker distribution registry) call otel.SetTracerProvider during their init and silently overwrite the global, sending our spans to the default OTLP endpoint instead of the runner traces ingest endpoint.

type Result

type Result struct {
	fx.Out

	Registrar             *Registrar
	ProcessLogProvider    *otellog.LoggerProvider  `name:"process-log-provider" optional:"true"`
	ProcessTracerProvider *sdktrace.TracerProvider `name:"process-tracer-provider" optional:"true"`
}

func New

func New(params Params) (Result, error)

New creates a process and registers it with the API during initialization (not in a lifecycle hook) so that the process ID, log stream ID, and OTEL provider are available to other FX dependencies during their New() calls.

type ShutdownPoller

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

func NewShutdownPoller

func NewShutdownPoller(params ShutdownPollerParams) *ShutdownPoller

type ShutdownPollerParams

type ShutdownPollerParams struct {
	fx.In

	APIClient  nuonrunner.Client
	Cfg        *internal.Config
	L          *zap.Logger `name:"system"`
	LC         fx.Lifecycle
	Registrar  *Registrar
	Settings   *settings.Settings
	Shutdowner fx.Shutdowner
}

Jump to

Keyboard shortcuts

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