work_schedule_console

package
v0.0.0-...-8122643 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PostWorkCmd string = "post-work"
View Source
const PostWorkDescription string = "Post work"

Variables

This section is empty.

Functions

func DefaultControllerBuilder

func DefaultControllerBuilder[T work_schedule.Work](app app_context.Context, workBuilder work_schedule.WorkBuilder[T], shedulerName string, pubsubTopicName string, configPath string) (work_schedule.WorkScheduler[T], error)

Types

type HandlerBase

type HandlerBase[T work_schedule.Work] struct {
	console_tool.HandlerBase[*WorkScheduleCommands[T]]
}

func (*HandlerBase[T]) Context

func (b *HandlerBase[T]) Context(data interface{}) (multitenancy.TenancyContext, work_schedule.WorkScheduler[T], error)

type PostWorkData

type PostWorkData struct {
	ReferenceType string `long:"reference_type" description:"Work reference type" validate:"required" vmessage:"Invalid reference type"`
	ReferenceId   string `long:"reference_id" description:"Work reference ID" validate:"required,id" vmessage:"Invalid reference ID"`
	Mode          string `` /* 130-byte string literal not displayed */
	Delay         int    `long:"delay" description:"Work invokation delay"`
}

type PostWorkHandler

type PostWorkHandler[T work_schedule.Work] struct {
	HandlerBase[T]
	PostWorkData
}

func (*PostWorkHandler[T]) Data

func (a *PostWorkHandler[T]) Data() interface{}

func (*PostWorkHandler[T]) Execute

func (a *PostWorkHandler[T]) Execute(args []string) error

type WorkScheduleCommands

type WorkScheduleCommands[T work_schedule.Work] struct {
	console_tool.Commands[*WorkScheduleCommands[T]]

	MakeController WorkSchedulerBuilder[T]
}

func NewWorkScheduleCommands

func NewWorkScheduleCommands[T work_schedule.Work](name string, description string, makeController WorkSchedulerBuilder[T]) *WorkScheduleCommands[T]

func (*WorkScheduleCommands[T]) LoadHandlers

func (w *WorkScheduleCommands[T]) LoadHandlers()

type WorkSchedulerBuilder

type WorkSchedulerBuilder[T work_schedule.Work] func(app app_context.Context) (work_schedule.WorkScheduler[T], error)

func MakeDefaultControllerBuilder

func MakeDefaultControllerBuilder[T work_schedule.Work](workBuilder work_schedule.WorkBuilder[T], shedulerName string, pubsubTopicName string, configPath string) WorkSchedulerBuilder[T]

Jump to

Keyboard shortcuts

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