jsondb

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWriterClosed  = errors.New("writer is closed")
	ErrWriterNotOpen = errors.New("writer is not open")
)

Functions

func ParseFile

func ParseFile(file string) (*model.Status, error)

Types

type JSONDB added in v1.0.6

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

JSONDB manages DAGs status files in local storage.

func New

func New(location string, latestStatusToday bool) *JSONDB

New creates a new JSONDB with default configuration.

func (*JSONDB) Close added in v1.0.6

func (s *JSONDB) Close() error

func (*JSONDB) Compact added in v1.0.6

func (s *JSONDB) Compact(original string) error

func (*JSONDB) FindByRequestID added in v1.0.6

func (s *JSONDB) FindByRequestID(dagFile string, requestID string) (*model.StatusFile, error)

func (*JSONDB) Open added in v1.0.6

func (s *JSONDB) Open(dagFile string, t time.Time, requestID string) error

func (*JSONDB) ReadStatusRecent added in v1.0.6

func (s *JSONDB) ReadStatusRecent(dagFile string, n int) []*model.StatusFile

func (*JSONDB) ReadStatusToday added in v1.0.6

func (s *JSONDB) ReadStatusToday(dagFile string) (*model.Status, error)

func (*JSONDB) RemoveAll added in v1.0.6

func (s *JSONDB) RemoveAll(dagFile string) error

func (*JSONDB) RemoveOld added in v1.0.6

func (s *JSONDB) RemoveOld(dagFile string, retentionDays int) error

func (*JSONDB) Rename added in v1.0.6

func (s *JSONDB) Rename(oldID, newID string) error

func (*JSONDB) Update added in v1.0.6

func (s *JSONDB) Update(dagFile, requestID string, status *model.Status) error

func (*JSONDB) Write added in v1.0.6

func (s *JSONDB) Write(status *model.Status) error

Jump to

Keyboard shortcuts

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