proc

package
v2.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package proc owns process liveness and control addressing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DAGSocketAddr

func DAGSocketAddr(dagRun ir.DAGRunRef) string

DAGSocketAddr returns the control socket address for a DAG run.

Types

type ProcEntry

type ProcEntry struct {
	GroupName       string
	Identity        ProcEntryID
	Meta            ProcMeta
	LastHeartbeatAt int64
	Fresh           bool
}

ProcEntry represents a storage-independent proc heartbeat observation.

func (ProcEntry) AttemptKey

func (e ProcEntry) AttemptKey() string

AttemptKey returns a stable identifier for the exact proc-backed attempt.

func (ProcEntry) DAGRun

func (e ProcEntry) DAGRun() ir.DAGRunRef

DAGRun returns the DAG-run reference for the proc entry.

func (ProcEntry) Heartbeat added in v2.14.0

func (e ProcEntry) Heartbeat(observedAt time.Time) ProcHeartbeat

Heartbeat returns a heartbeat observation for the entry.

func (ProcEntry) IsRoot

func (e ProcEntry) IsRoot() bool

IsRoot reports whether the proc entry belongs to a root DAG run.

func (ProcEntry) RunScopeKey

func (e ProcEntry) RunScopeKey() string

RunScopeKey returns a stable identifier for the DAG-run scope across attempts.

func (ProcEntry) SameObservation added in v2.14.0

func (e ProcEntry) SameObservation(other ProcEntry) bool

SameObservation reports whether two entries describe the same stored heartbeat observation.

type ProcEntryID

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

ProcEntryID is an opaque identity used for exact stale-entry removal. Callers must not interpret it as a filesystem path or record key.

func NewProcEntryID

func NewProcEntryID(token string) ProcEntryID

NewProcEntryID creates an opaque proc entry identity token.

func NewStoreEntryID added in v2.14.0

func NewStoreEntryID(kind, value string) ProcEntryID

NewStoreEntryID creates an opaque identity for a backend record.

func (ProcEntryID) IsZero

func (id ProcEntryID) IsZero() bool

IsZero reports whether the identity is empty.

func (ProcEntryID) StoreValue added in v2.14.0

func (id ProcEntryID) StoreValue(kind string) (string, bool)

StoreValue returns the backend value when the identity belongs to kind.

func (ProcEntryID) String

func (id ProcEntryID) String() string

String returns an opaque display token. Callers must not parse it.

type ProcHandle

type ProcHandle interface {
	// Stop stops the heartbeat for the process.
	Stop(ctx context.Context) error
}

ProcHandle represents a process that is associated with a dag-run.

type ProcHeartbeat

type ProcHeartbeat struct {
	GroupName       string
	DAGRun          ir.DAGRunRef
	AttemptID       string
	StartedAt       int64
	LastHeartbeatAt int64
	ObservedAt      time.Time
	Fresh           bool
}

ProcHeartbeat is a storage-independent observation of a proc heartbeat.

func (ProcHeartbeat) AdvancedSince

func (h ProcHeartbeat) AdvancedSince(previous ProcHeartbeat) bool

AdvancedSince reports whether this observation is newer than previous.

func (ProcHeartbeat) PreferredTo added in v2.14.0

func (h ProcHeartbeat) PreferredTo(other ProcHeartbeat) bool

PreferredTo reports whether this is the preferred latest observation.

type ProcMeta

type ProcMeta struct {
	StartedAt    int64
	Name         string
	DAGRunID     string
	AttemptID    string
	RootName     string
	RootDAGRunID string
}

ProcMeta is a struct that holds metadata for a process.

func (ProcMeta) DAGRun

func (m ProcMeta) DAGRun() ir.DAGRunRef

DAGRun returns the DAG-run reference for the proc entry.

func (ProcMeta) Root

func (m ProcMeta) Root() ir.DAGRunRef

Root returns the root DAG-run reference if present.

func (ProcMeta) Validate added in v2.14.0

func (m ProcMeta) Validate() error

Validate reports whether the process metadata is valid.

Jump to

Keyboard shortcuts

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