Documentation ¶
Index ¶
- Variables
- func Error(err error)
- func Start(runtimes []Runtime, sleepTime time.Duration) error
- func Stop()
- func Wait()
- type Configuration
- func HttpWithHandler(handler http.Handler) Configuration[*HttpRunnable]
- func HttpWithPort(port int) Configuration[*HttpRunnable]
- func HttpWithReadHeaderTimeout(timeout time.Duration) Configuration[*HttpRunnable]
- func HttpWithReadTimeout(timeout time.Duration) Configuration[*HttpRunnable]
- func HttpWithWriteTimeout(timeout time.Duration) Configuration[*HttpRunnable]
- func LoopWithLoop[C any](loop Loop[C]) Configuration[*LoopRunnable[C]]
- type HttpRunnable
- type Loop
- type LoopRunnable
- type Primary
- type Runnable
- type Runner
- type Runtime
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHttpMissingServer = errors.New("http runtime no server provided") ErrHttpMissingHandler = errors.New("http runtime no handler provided") )
Errors
View Source
var ( ErrLoopRuntimeNoLoop = errors.New("functional runtime no loop function provided") ErrLoopRuntimeInitialise = errors.New("functional runtime initialise function failed") )
Errors
View Source
var ( ErrPrimaryInitialiseError = errors.New("primary runtime initialise function failed") ErrPrimaryTesting = errors.New("primary runtime testing error") )
Errors
View Source
var ( ErrRunnerRuntimeNoRunnable = errors.New("runner runtime no runnable provided") ErrRunnerRuntimeRunnableStart = errors.New("runner runtime runnable failed to start") )
Errors
Functions ¶
Types ¶
type Configuration ¶
type Configuration[R any] func(R) R
func HttpWithHandler ¶
func HttpWithHandler(handler http.Handler) Configuration[*HttpRunnable]
configuration
func HttpWithPort ¶
func HttpWithPort(port int) Configuration[*HttpRunnable]
func HttpWithReadHeaderTimeout ¶
func HttpWithReadHeaderTimeout(timeout time.Duration) Configuration[*HttpRunnable]
func HttpWithReadTimeout ¶
func HttpWithReadTimeout(timeout time.Duration) Configuration[*HttpRunnable]
func HttpWithWriteTimeout ¶
func HttpWithWriteTimeout(timeout time.Duration) Configuration[*HttpRunnable]
func LoopWithLoop ¶ added in v0.0.6
func LoopWithLoop[C any](loop Loop[C]) Configuration[*LoopRunnable[C]]
configuration
type HttpRunnable ¶ added in v0.0.6
type HttpRunnable struct {
// contains filtered or unexported fields
}
implementation
func (*HttpRunnable) Run ¶ added in v0.0.6
func (c *HttpRunnable) Run() error
func (*HttpRunnable) Start ¶ added in v0.0.6
func (c *HttpRunnable) Start() error
func (*HttpRunnable) Stop ¶ added in v0.0.6
func (c *HttpRunnable) Stop()
type Loop ¶ added in v0.0.6
type Loop[C any] interface { Initialise() (C, error) Cleanup(C) Loop(C, context.CancelFunc) error }
type LoopRunnable ¶ added in v0.0.6
type LoopRunnable[C any] struct { // contains filtered or unexported fields }
implementation
func LoopDefault ¶ added in v0.0.6
func LoopDefault[C any](c *LoopRunnable[C]) *LoopRunnable[C]
default
func (*LoopRunnable[C]) Run ¶ added in v0.0.6
func (r *LoopRunnable[C]) Run() error
func (*LoopRunnable[C]) Start ¶ added in v0.0.6
func (r *LoopRunnable[C]) Start() error
func (*LoopRunnable[C]) Stop ¶ added in v0.0.6
func (r *LoopRunnable[C]) Stop()
type Runtime ¶
type Runtime interface { Start() error Stop() }
func NewLoop ¶ added in v0.0.6
func NewLoop[C any](configurations ...Configuration[*LoopRunnable[C]]) Runtime
constructor
Click to show internal directories.
Click to hide internal directories.