cron

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Schedule corresponds to the JSON schema field "schedule".
	Schedule string `json:"schedule" yaml:"schedule" mapstructure:"schedule"`
}

func (Config) New

func (*Config) UnmarshalJSON

func (j *Config) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type Payload

type Payload struct {
	// Time that cron trigger's task execution occurred (RFC3339Nano formatted)
	ActualExecutionTime string `json:"ActualExecutionTime" yaml:"ActualExecutionTime" mapstructure:"ActualExecutionTime"`

	// Time that cron trigger's task execution had been scheduled to occur
	// (RFC3339Nano formatted)
	ScheduledExecutionTime string `json:"ScheduledExecutionTime" yaml:"ScheduledExecutionTime" mapstructure:"ScheduledExecutionTime"`
}

func (*Payload) UnmarshalJSON

func (j *Payload) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type PayloadCap

type PayloadCap interface {
	sdk.CapDefinition[Payload]
	ActualExecutionTime() sdk.CapDefinition[string]
	ScheduledExecutionTime() sdk.CapDefinition[string]
	// contains filtered or unexported methods
}

func ConstantPayload

func ConstantPayload(value Payload) PayloadCap

func NewPayloadFromFields

func NewPayloadFromFields(
	actualExecutionTime sdk.CapDefinition[string],
	scheduledExecutionTime sdk.CapDefinition[string]) PayloadCap

func PayloadWrapper

func PayloadWrapper(raw sdk.CapDefinition[Payload]) PayloadCap

PayloadWrapper allows access to field from an sdk.CapDefinition[Payload]

type Trigger

type Trigger struct {
	// Config corresponds to the JSON schema field "config".
	Config Config `json:"config" yaml:"config" mapstructure:"config"`

	// Outputs corresponds to the JSON schema field "outputs".
	Outputs Payload `json:"outputs" yaml:"outputs" mapstructure:"outputs"`
}

A trigger that uses a cron schedule to run periodically at fixed times, dates, or intervals.

func (*Trigger) UnmarshalJSON

func (j *Trigger) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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