checkpoints

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCheckpointName = "default"

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	Name              string    `json:"name" gorm:"primaryKey;autoIncrement:false"`
	Job               string    `json:"job" gorm:"primaryKey;autoIncrement:false"`
	LastCompletedTime time.Time `json:"lastCompletedTime" gorm:"type:timestamptz"`
}

type CheckpointQuery

type CheckpointQuery struct {
	Name string `json:"name,omitempty"`
	Job  string `json:"job,omitempty"`
}

type CheckpointRepository

type CheckpointRepository interface {
	database.Repository
	SetCheckpoint(checkpoint *Checkpoint) error
	ListCheckpoints() ([]*Checkpoint, error)
	QueryCheckpoints(query *CheckpointQuery) ([]*Checkpoint, error)
	GetCheckpoint(query *CheckpointQuery) (*Checkpoint, error)

	ResetAllCheckpoints(newCheckpointTime time.Time) error
	ResetCheckpoints(request *ResetCheckpointsRequest) error
	EnforceMinimumCheckpointTime(minimum time.Time) error
}

func NewPostgresqlCheckpointRepository

func NewPostgresqlCheckpointRepository() CheckpointRepository

type ListCheckpointsResult

type ListCheckpointsResult struct {
	Checkpoints []*Checkpoint `json:"checkpoints"`
}

type PostgresqlCheckpointRepository

type PostgresqlCheckpointRepository struct {
	database.Repository
	// contains filtered or unexported fields
}

func (*PostgresqlCheckpointRepository) EnforceMinimumCheckpointTime

func (r *PostgresqlCheckpointRepository) EnforceMinimumCheckpointTime(minimum time.Time) error

EnforceMinimumCheckpointTime sets all non-default checkpoints to the given minimum time

func (*PostgresqlCheckpointRepository) GetCheckpoint

func (r *PostgresqlCheckpointRepository) GetCheckpoint(query *CheckpointQuery) (*Checkpoint, error)

func (*PostgresqlCheckpointRepository) Initialize

func (r *PostgresqlCheckpointRepository) Initialize(connection database.Connection) error

func (*PostgresqlCheckpointRepository) ListCheckpoints

func (r *PostgresqlCheckpointRepository) ListCheckpoints() ([]*Checkpoint, error)

func (*PostgresqlCheckpointRepository) QueryCheckpoints

func (r *PostgresqlCheckpointRepository) QueryCheckpoints(query *CheckpointQuery) ([]*Checkpoint, error)

func (*PostgresqlCheckpointRepository) ResetAllCheckpoints

func (r *PostgresqlCheckpointRepository) ResetAllCheckpoints(newCheckpointTime time.Time) error

func (*PostgresqlCheckpointRepository) ResetCheckpoints

func (r *PostgresqlCheckpointRepository) ResetCheckpoints(request *ResetCheckpointsRequest) error

func (*PostgresqlCheckpointRepository) SetCheckpoint

func (r *PostgresqlCheckpointRepository) SetCheckpoint(checkpoint *Checkpoint) error

type QueryCheckpointsRequest

type QueryCheckpointsRequest struct {
	CheckpointQuery
}

type QueryCheckpointsResult

type QueryCheckpointsResult struct {
	Checkpoints []*Checkpoint `json:"checkpoints"`
}

type ResetCheckpointsRequest

type ResetCheckpointsRequest struct {
	NewCheckpointTime time.Time `json:"newCheckpointTime"`
	CheckpointQuery
}

Jump to

Keyboard shortcuts

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