Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoClose ¶
type AutoClose struct {
// contains filtered or unexported fields
}
AutoClose simulates a task that starts and then fails with an error after a delay.
func NewAutoClose ¶
func NewAutoClose() *AutoClose
func NewAutoCloseWithDelay ¶
func (*AutoClose) Identifier ¶
type AutoPanic ¶
type AutoPanic struct {
// contains filtered or unexported fields
}
AutoPanic simulates a task that panics during startup.
func NewAutoPanic ¶
func NewAutoPanic() *AutoPanic
func NewAutoPanicWithDelay ¶
func (*AutoPanic) Identifier ¶
type ContextAwareTask ¶
type ContextAwareTask struct {
// contains filtered or unexported fields
}
ContextAwareTask simulates a task that properly respects context cancellation.
func NewContextAwareTask ¶
func NewContextAwareTask(id string) *ContextAwareTask
func (*ContextAwareTask) Identifier ¶
func (c *ContextAwareTask) Identifier() string
func (*ContextAwareTask) IsStarted ¶
func (c *ContextAwareTask) IsStarted() bool
func (*ContextAwareTask) IsStopped ¶
func (c *ContextAwareTask) IsStopped() bool
type FailingStartTask ¶
type FailingStartTask struct {
// contains filtered or unexported fields
}
FailingStartTask simulates a task that fails to start immediately.
func NewFailingStartTask ¶
func NewFailingStartTask(id string, err error) *FailingStartTask
func (*FailingStartTask) Identifier ¶
func (f *FailingStartTask) Identifier() string
func (*FailingStartTask) IsStopped ¶
func (f *FailingStartTask) IsStopped() bool
type FailingStopTask ¶
type FailingStopTask struct {
// contains filtered or unexported fields
}
FailingStopTask simulates a task that fails to stop gracefully.
func NewFailingStopTask ¶
func NewFailingStopTask(id string, stopError error) *FailingStopTask
func (*FailingStopTask) Identifier ¶
func (f *FailingStopTask) Identifier() string
func (*FailingStopTask) IsStarted ¶
func (f *FailingStopTask) IsStarted() bool
func (*FailingStopTask) IsStopped ¶
func (f *FailingStopTask) IsStopped() bool
type ServerExample ¶
type ServerExample struct {
// contains filtered or unexported fields
}
ServerExample simulates a long-running HTTP server task.
func NewServerExample ¶
func NewServerExample() *ServerExample
func (*ServerExample) Identifier ¶
func (s *ServerExample) Identifier() string
type SlowStartTask ¶
type SlowStartTask struct {
// contains filtered or unexported fields
}
SlowStartTask simulates a task with slow startup.
func NewSlowStartTask ¶
func NewSlowStartTask(id string, startTime time.Duration) *SlowStartTask
func (*SlowStartTask) Identifier ¶
func (s *SlowStartTask) Identifier() string
func (*SlowStartTask) IsStarted ¶
func (s *SlowStartTask) IsStarted() bool
func (*SlowStartTask) IsStopped ¶
func (s *SlowStartTask) IsStopped() bool
type SlowStopTask ¶
type SlowStopTask struct {
// contains filtered or unexported fields
}
SlowStopTask simulates a task that takes time to stop.
func NewSlowStopTask ¶
func NewSlowStopTask(id string, stopTime time.Duration) *SlowStopTask
func (*SlowStopTask) Identifier ¶
func (s *SlowStopTask) Identifier() string
func (*SlowStopTask) IsStarted ¶
func (s *SlowStopTask) IsStarted() bool
func (*SlowStopTask) IsStopped ¶
func (s *SlowStopTask) IsStopped() bool
type SuccessTask ¶
type SuccessTask struct {
// contains filtered or unexported fields
}
SuccessTask simulates a task that starts successfully and runs until stopped.
func NewSuccessTask ¶
func NewSuccessTask(id string) *SuccessTask
func (*SuccessTask) Identifier ¶
func (s *SuccessTask) Identifier() string
func (*SuccessTask) IsStarted ¶
func (s *SuccessTask) IsStarted() bool
func (*SuccessTask) IsStopped ¶
func (s *SuccessTask) IsStopped() bool
Click to show internal directories.
Click to hide internal directories.