Documentation
¶
Overview ¶
Package proc owns process liveness and control addressing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DAGSocketAddr ¶
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 ¶
AttemptKey returns a stable identifier for the exact proc-backed attempt.
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) RunScopeKey ¶
RunScopeKey returns a stable identifier for the DAG-run scope across attempts.
func (ProcEntry) SameObservation ¶ added in v2.14.0
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.