types

package
v0.0.0-...-c503993 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEventNotFound = errors.New("cron event not found")

ErrEventNotFound error when cron event not found

Functions

func GetURI

func GetURI(e Event) string

GetURI get cron event unique key for store, in form {cron-expression}:{message}

Types

type Event

type Event struct {
	// cron expression
	Expression string `json:"expression"`
	// event message
	Message string `json:"message"`
	// event account
	Account string `json:"account"`
	// event secret
	Secret string `json:"secret"`
	// Description human readable text
	Description string `json:"description,omitempty"`
	// Status current event handler status (active, error, not active)
	Status string `json:"status,omitempty"`
	// Help test
	Help string `json:"help,omitempty"`
}

Event extended cron event

func ConstructEvent

func ConstructEvent(uri string, secret string, cronguru cronexp.Service) (*Event, error)

ConstructEvent convert construct event from store key

type EventStore

type EventStore interface {
	StoreEvent(event Event) error
	DeleteEvent(uri string) error
	GetEvent(uri string) (*Event, error)
	GetAllEvents() ([]Event, error)
	GetDBStats() (int, error)
	BackupDB(w io.Writer) (int, error)
}

EventStore job manager interface to add/remove running jobs

Jump to

Keyboard shortcuts

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