Documentation ¶
Index ¶
- func ParseFile(file string) (*model.Status, error)
- type Store
- func (store *Store) Close() error
- func (store *Store) Compact(_, original string) error
- func (store *Store) FindByRequestId(dagFile string, requestId string) (*model.StatusFile, error)
- func (store *Store) Open(dagFile string, t time.Time, requestId string) error
- func (store *Store) ReadStatusRecent(dagFile string, n int) []*model.StatusFile
- func (store *Store) ReadStatusToday(dagFile string) (*model.Status, error)
- func (store *Store) RemoveAll(dagFile string) error
- func (store *Store) RemoveOld(dagFile string, retentionDays int) error
- func (store *Store) Rename(oldName, newName string) error
- func (store *Store) Update(dagFile, requestId string, s *model.Status) error
- func (store *Store) Write(s *model.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the interfact to store dags status in local. It stores status in JSON format in a directory as per each dagFile. Multiple JSON data can be stored in a single file and each data is separated by newline. When a data is updated, it appends a new line to the file. Only the latest data in a single file can be read. When Compact is called, it removes old data. Compact must be called only once per file.
func (*Store) FindByRequestId ¶
FindByRequestId finds a status file by requestId.
func (*Store) ReadStatusRecent ¶
func (store *Store) ReadStatusRecent(dagFile string, n int) []*model.StatusFile
ReadStatusHist returns a list of status files.
func (*Store) ReadStatusToday ¶
ReadStatusToday returns a list of status files.
Click to show internal directories.
Click to hide internal directories.