Documentation
¶
Index ¶
- Variables
- func Listen(name string, callback func()) (cancel func())
- func ListenBuffered(name string, callback func()) (cancel func())
- func Signal(name string)
- type ITrigger
- type Job
- func (s *Job) Join(c context.Context) error
- func (s *Job) Kill()
- func (j *Job) Ready(ctx context.Context)
- func (s *Job) Restart()
- func (s *Job) Start() (w task.Worker, started bool)
- func (s *Job) Status() task.StatusOrError
- func (s *Job) Stop()
- func (s *Job) Traverse(fn func(task.Worker) bool)
- func (j *Job) UnmarshalJSON(data []byte) error
- func (s *Job) Worker() task.Worker
- type LoggerOptions
- type Manifest
- type Trigger
- type TriggerAlways
- type TriggerAny
- type TriggerBoot
- type TriggerEvery
- type TriggerNever
- type TriggerOn
- type TriggerOnce
Constants ¶
This section is empty.
Variables ¶
View Source
var TriggerRegistry = automarshal.NewRegistry[Trigger, ITrigger]()
Functions ¶
func ListenBuffered ¶
func ListenBuffered(name string, callback func()) (cancel func())
Types ¶
type Job ¶
type Job struct { context.Context Manifest *Manifest ID string Main task.Task Cancel context.CancelFunc Options task.Options Logger *clog.Logger Launch *Trigger Drop *Trigger Whiteboard atomic.Pointer[task.Whiteboard] // contains filtered or unexported fields }
func (*Job) Status ¶
func (s *Job) Status() task.StatusOrError
func (*Job) UnmarshalJSON ¶
type LoggerOptions ¶
type Manifest ¶
type Trigger ¶
type Trigger struct { ITrigger automarshal.ID }
func (Trigger) MarshalJSON ¶
func (*Trigger) UnmarshalJSON ¶
type TriggerAlways ¶
type TriggerAlways struct{}
func (TriggerAlways) Listen ¶
func (t TriggerAlways) Listen(callback func()) (remove func())
func (*TriggerAlways) UnmarshalInline ¶
func (h *TriggerAlways) UnmarshalInline(text string) (err error)
type TriggerAny ¶
type TriggerAny struct {
List []Trigger `json:"list"`
}
func (TriggerAny) Listen ¶
func (t TriggerAny) Listen(callback func()) (remove func())
type TriggerBoot ¶
type TriggerBoot struct { }
func (TriggerBoot) Listen ¶
func (t TriggerBoot) Listen(callback func()) (remove func())
func (*TriggerBoot) UnmarshalInline ¶
func (h *TriggerBoot) UnmarshalInline(text string) (err error)
type TriggerEvery ¶
type TriggerEvery struct {
Duration util.ParsableDuration `json:"duration"`
}
func (TriggerEvery) Listen ¶
func (t TriggerEvery) Listen(callback func()) (remove func())
func (*TriggerEvery) UnmarshalInline ¶
func (h *TriggerEvery) UnmarshalInline(text string) (err error)
type TriggerNever ¶
type TriggerNever struct{}
func (TriggerNever) Listen ¶
func (t TriggerNever) Listen(callback func()) (remove func())
func (*TriggerNever) UnmarshalInline ¶
func (h *TriggerNever) UnmarshalInline(text string) (err error)
type TriggerOn ¶
type TriggerOn struct {
Name string `json:"name"`
}
func (*TriggerOn) UnmarshalInline ¶
func (*TriggerOn) WithDefaults ¶
func (h *TriggerOn) WithDefaults(i automarshal.ID)
type TriggerOnce ¶
type TriggerOnce struct {
Name string `json:"name"`
}
func (TriggerOnce) Listen ¶
func (t TriggerOnce) Listen(callback func()) (remove func())
func (*TriggerOnce) UnmarshalInline ¶
func (h *TriggerOnce) UnmarshalInline(text string) (err error)
func (*TriggerOnce) WithDefaults ¶
func (h *TriggerOnce) WithDefaults(i automarshal.ID)
Click to show internal directories.
Click to hide internal directories.