fileproc

package
v1.30.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHeartbeatAlreadyStarted = fmt.Errorf("heartbeat already started")
)

Error messages

Functions

This section is empty.

Types

type ProcGroup

type ProcGroup struct {
	dirlock.DirLock
	// contains filtered or unexported fields
}

ProcGroup is a struct that manages process files for a given DAG name.

func NewProcGroup

func NewProcGroup(baseDir, groupName string, staleTime time.Duration) *ProcGroup

NewProcGroup creates a new instance of a ProcGroup with the specified base directory and DAG name.

func (*ProcGroup) Acquire

func (pg *ProcGroup) Acquire(_ context.Context, dagRun execution.DAGRunRef) (*ProcHandle, error)

GetProc retrieves a proc file for the specified dag-run reference. It returns a new Proc instance with the generated file name.

func (*ProcGroup) Count

func (pg *ProcGroup) Count(ctx context.Context) (int, error)

Count retrieves the count of alive proc files for the specified DAG name.

func (*ProcGroup) CountByDAGName added in v1.22.0

func (pg *ProcGroup) CountByDAGName(ctx context.Context, dagName string) (int, error)

func (*ProcGroup) IsRunAlive added in v1.18.0

func (pg *ProcGroup) IsRunAlive(ctx context.Context, dagRun execution.DAGRunRef) (bool, error)

IsRunAlive checks if a specific DAG run has an alive process file.

func (*ProcGroup) ListAlive added in v1.19.0

func (pg *ProcGroup) ListAlive(ctx context.Context) ([]execution.DAGRunRef, error)

ListAlive returns a list of alive DAG runs by scanning process files.

type ProcHandle

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

ProcHandle is a struct that implements the ProcHandle interface.

func NewProcHandler

func NewProcHandler(file string, meta execution.ProcMeta) *ProcHandle

NewProcHandler creates a new instance of Proc with the specified file name.

func (*ProcHandle) GetMeta

func (p *ProcHandle) GetMeta() execution.ProcMeta

GetMeta implements models.ProcHandle.

func (*ProcHandle) Stop

func (p *ProcHandle) Stop(_ context.Context) error

Stop implements models.Proc.

type Store

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

Store is a struct that implements the ProcStore interface.

func New

func New(baseDir string) *Store

New creates a new instance of Store with the specified base directory.

func (*Store) Acquire

func (s *Store) Acquire(ctx context.Context, groupName string, dagRun execution.DAGRunRef) (execution.ProcHandle, error)

Acquire implements models.ProcStore.

func (*Store) CountAlive

func (s *Store) CountAlive(ctx context.Context, groupName string) (int, error)

CountAlive implements models.ProcStore.

func (*Store) CountAliveByDAGName added in v1.22.0

func (s *Store) CountAliveByDAGName(ctx context.Context, groupName, dagName string) (int, error)

func (*Store) IsRunAlive added in v1.18.0

func (s *Store) IsRunAlive(ctx context.Context, groupName string, dagRun execution.DAGRunRef) (bool, error)

IsRunAlive implements models.ProcStore.

func (*Store) ListAlive added in v1.19.0

func (s *Store) ListAlive(ctx context.Context, groupName string) ([]execution.DAGRunRef, error)

ListAlive implements models.ProcStore.

func (*Store) ListAllAlive added in v1.22.0

func (s *Store) ListAllAlive(ctx context.Context) (map[string][]execution.DAGRunRef, error)

ListAllAlive implements models.ProcStore. Returns all running DAG runs across all process groups.

func (*Store) Lock added in v1.24.8

func (s *Store) Lock(ctx context.Context, groupName string) error

Lock locks process group

func (*Store) Unlock added in v1.22.0

func (s *Store) Unlock(ctx context.Context, groupName string)

Lock locks process group

Jump to

Keyboard shortcuts

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