runtime

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration[R any] func(R) R

func WithController

func WithController(controller Controller) Configuration[*MultiRuntime]

configuration

func WithRuntime

func WithRuntime(runtime Runtime) Configuration[*MultiRuntime]

type ContextKey

type ContextKey struct {
	Name string
}

func Context

func Context(name string) ContextKey

type Controller

type Controller interface {
	Started() // denotes that a runtime element has started
	Stopped() // denotes that a runtime element has stopped
	Wait()
}

func NewController

func NewController() Controller

type MultiRuntime

type MultiRuntime struct {
	// contains filtered or unexported fields
}

implementation

func (*MultiRuntime) Interrupt

func (runtime *MultiRuntime) Interrupt()

func (*MultiRuntime) Panic

func (runtime *MultiRuntime) Panic()

func (*MultiRuntime) Start

func (r *MultiRuntime) Start() error

func (*MultiRuntime) Stop

func (r *MultiRuntime) Stop()

type Producer

type Producer interface {
	Produce(context.Context, []message.Message[message.Bytes, message.Bytes]) error
	Start() error
	Stop()
}

type Runtime

type Runtime interface {
	Start() error
	Stop()
}

func NewMulti

func NewMulti(configurations ...Configuration[*MultiRuntime]) Runtime

constructor

type RuntimeController

type RuntimeController struct {
	// contains filtered or unexported fields
}

func (*RuntimeController) Started

func (c *RuntimeController) Started()

func (*RuntimeController) Stopped

func (c *RuntimeController) Stopped()

func (*RuntimeController) Wait

func (c *RuntimeController) Wait()

Jump to

Keyboard shortcuts

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