storage

package
v0.0.0-...-3475d41 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProgramExists       = errors.New("program exists")
	ErrProgramDoesNotExist = errors.New("program does not exist")
)

Functions

This section is empty.

Types

type ExecutionLogWriter

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

func NewExecutionLogWriter

func NewExecutionLogWriter(storage *FileStorage, name string, resolution int64) *ExecutionLogWriter

func (*ExecutionLogWriter) AddLine

func (writer *ExecutionLogWriter) AddLine(status *types.ExecutionStatus)

func (*ExecutionLogWriter) Close

func (writer *ExecutionLogWriter) Close()

type FileStorage

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

func NewFileStorage

func NewFileStorage(basePath string) (*FileStorage, error)

func (*FileStorage) CreateExecutedProgram

func (storage *FileStorage) CreateExecutedProgram(programName string, program *types.Program) error

func (*FileStorage) CreateStoredProgram

func (storage *FileStorage) CreateStoredProgram(programName string, program *types.Program) error

func (*FileStorage) DeleteExecutedProgram

func (storage *FileStorage) DeleteExecutedProgram(programName string) error

func (*FileStorage) DeleteStoredProgram

func (storage *FileStorage) DeleteStoredProgram(programName string) error

func (*FileStorage) ListExecutedPrograms

func (storage *FileStorage) ListExecutedPrograms() ([]string, error)

func (*FileStorage) ListStoredPrograms

func (storage *FileStorage) ListStoredPrograms() ([]string, error)

func (*FileStorage) LoadExecutedProgram

func (storage *FileStorage) LoadExecutedProgram(programName string) (*types.Program, error)

func (*FileStorage) LoadState

func (storage *FileStorage) LoadState(name string) (types.ProgramState, int64, error)

func (*FileStorage) LoadStoredProgram

func (storage *FileStorage) LoadStoredProgram(programName string) (*types.Program, error)

func (*FileStorage) MaybeDeleteExecutionLog

func (storage *FileStorage) MaybeDeleteExecutionLog(name string)

func (*FileStorage) MaybeDeleteState

func (storage *FileStorage) MaybeDeleteState(name string)

func (*FileStorage) SaveStoredProgram

func (storage *FileStorage) SaveStoredProgram(programName string, program *types.Program) error

func (*FileStorage) UpdateStoredProgram

func (storage *FileStorage) UpdateStoredProgram(programName string, program *types.Program) error

type StateWriter

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

func NewStateWriter

func NewStateWriter(storage *FileStorage, name string) *StateWriter

func (*StateWriter) UpdateState

func (statusWriter *StateWriter) UpdateState(status types.ProgramState) error

Jump to

Keyboard shortcuts

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