taskstore

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: PostgreSQL Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusPending   = "PENDING"
	StatusRunning   = "RUNNING"
	StatusCompleted = "COMPLETED"
	StatusFailed    = "FAILED"
)
View Source
const (
	TaskTypeTableDiff          = "TABLE_DIFF"
	TaskTypeTableRepair        = "TABLE_REPAIR"
	TaskTypeTableRerun         = "TABLE_RERUN"
	TaskTypeSchemaDiff         = "SCHEMA_DIFF"
	TaskTypeRepsetDiff         = "REPSET_DIFF"
	TaskTypeSpockDiff          = "SPOCK_DIFF"
	TaskTypeMtreeBuild         = "MTREE_BUILD"
	TaskTypeMtreeUpdate        = "MTREE_UPDATE"
	TaskTypeMtreeDiff          = "MTREE_DIFF"
	TaskTypeMtreeInit          = "MTREE_INIT"
	TaskTypeMtreeTeardown      = "MTREE_TEARDOWN"
	TaskTypeMtreeTeardownTable = "MTREE_TEARDOWN_TABLE"
	TaskTypeMtreeListen        = "MTREE_LISTEN"
)

Variables

View Source
var ErrNotFound = errors.New("task not found")

Functions

This section is empty.

Types

type Record

type Record struct {
	TaskID         string
	TaskType       string
	Status         string
	ClusterName    string
	SchemaName     string
	TableName      string
	RepsetName     string
	DiffFilePath   string
	StartedAt      time.Time
	FinishedAt     time.Time
	TimeTaken      float64
	TaskContext    map[string]any
	RawTaskContext string
}

type Recorder

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

func NewRecorder

func NewRecorder(existing *Store, path string) (*Recorder, error)

func (*Recorder) Close

func (r *Recorder) Close() error

func (*Recorder) Create

func (r *Recorder) Create(rec Record) error

func (*Recorder) Created

func (r *Recorder) Created() bool

func (*Recorder) HasStore

func (r *Recorder) HasStore() bool

func (*Recorder) OwnsStore

func (r *Recorder) OwnsStore() bool

func (*Recorder) Store

func (r *Recorder) Store() *Store

func (*Recorder) Update

func (r *Recorder) Update(rec Record) error

type Store

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

func New

func New(path string) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Create

func (s *Store) Create(rec Record) error

func (*Store) Get added in v1.4.0

func (s *Store) Get(taskID string) (Record, error)

func (*Store) Update

func (s *Store) Update(rec Record) error

Jump to

Keyboard shortcuts

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