schedule

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidScheduleID     = errors.New("invalid schedule ID")
	ErrInvalidScheduleEpoch  = errors.New("invalid schedule Epoch")
	ErrOutdatedScheduleEpoch = errors.New("outdated schedule Epoch")
)

Functions

func AreSame

func AreSame(arr1, arr2 []Schedule) bool

checks if two slices of schedules are the same (order doesn't matter)

func CheckSchedule

func CheckSchedule(s Schedule) error

checks if schedule id and epoch are valid

Types

type DeleteSchedules

type DeleteSchedules struct {
	DeleteFunc func(s Schedule) bool
	Time       time.Time
}

DeleteSchedules informs that schedules should be deleted based on the DeleteFunc

func (DeleteSchedules) String

func (d DeleteSchedules) String() string

func (DeleteSchedules) Timestamp

func (d DeleteSchedules) Timestamp() int64

type DeletedSchedule

type DeletedSchedule struct {
	Schedule
}

DeletedSchedule is a deleted schedule in the store

type InvalidSchedule

type InvalidSchedule struct {
	Schedule
	Error error
}

InvalidSchedule represents an invalid schedules (bad epoch)

type MissedSchedule

type MissedSchedule struct {
	Schedule
}

MissedSchedule represents schedules that was missed by the scheduler

type Partialer

type Partialer interface {
	Partial() Schedule
}

type Schedule

type Schedule interface {
	// schedule ID (should be uniq per schedule type)
	ID() string
	// schedule due date in seconds (epoch)
	Epoch() int64
	// Timestamp returns the creation date of the schedule
	Timestamp() int64
	// String returns a string representation
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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