store

package
v0.0.0-...-29bfd1e Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrScheduleNotExist = errors.New("schedule does not exist")

Functions

This section is empty.

Types

type CronHistoryRepository

type CronHistoryRepository interface {
	Insert(status *model.CronStatus, maxSamplesPerCron int) error
	GetHistory(n int) ([]*model.CronStatus, error)
	GetCronHistory(cronID int64, n int) ([]*model.CronStatus, error)
}

type CronScheduleRepository

type CronScheduleRepository interface {
	Get(id int64) (*model.CronSchedule, error)
	Save(sched *model.CronSchedule) (int64, error)
	Delete(id int64) error
	Iter(iterFunc func(cron *model.CronSchedule) error) error
}

type Store

type Store interface {
	CronScheduleRepository() CronScheduleRepository
	HistoryRepository() CronHistoryRepository
}

func New

func New(path string) (Store, error)

Jump to

Keyboard shortcuts

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