models

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HoursInDay   = 24
	HoursInMonth = HoursInDay * 30
)

Variables

View Source
var (
	ErrNoSuchSpec  = errors.New("spec not found")
	ErrNoJobs      = errors.New("no job found")
	ErrNoResources = errors.New("no resources found")
)

Functions

func GetEndRunDate

func GetEndRunDate(runTime time.Time, window Window) (time.Time, error)

GetEndRunDate subtract 1 day to make end inclusive

Types

type JobSpecTaskWindow

type JobSpecTaskWindow struct {
	Size       time.Duration
	Offset     time.Duration
	TruncateTo string
}

type Window

type Window interface {
	Validate() error

	GetStartTime(scheduleTime time.Time) (time.Time, error)
	GetEndTime(scheduleTime time.Time) (time.Time, error)
	GetTruncateTo() string
	GetOffset() string
	GetSize() string
	GetVersion() int
}

func NewWindow

func NewWindow(version int, truncateTo, offset, size string) (Window, error)

Jump to

Keyboard shortcuts

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