models

package
v0.11.10 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 9 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")
)
View Source
var ErrUnsupportedPlugin = errors.New("unsupported plugin requested, make sure its correctly installed")

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 PluginRepository

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

func NewPluginRepository

func NewPluginRepository() *PluginRepository

func (*PluginRepository) AddYaml

func (s *PluginRepository) AddYaml(yamlMod plugin.YamlMod) error

func (*PluginRepository) GetAll

func (s *PluginRepository) GetAll() []*plugin.Plugin

func (*PluginRepository) GetByName

func (s *PluginRepository) GetByName(name string) (*plugin.Plugin, error)

func (*PluginRepository) GetHooks

func (s *PluginRepository) GetHooks() []*plugin.Plugin

func (*PluginRepository) GetTasks

func (s *PluginRepository) GetTasks() []*plugin.Plugin

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