presets

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoMain

func DoMain(m *testing.M)

DoMain runs the pre- and post-processing of tests, to setup the default global orchestrator and global logger.

func NewSetup

func NewSetup(t stack.T, opts ...stack.Option) *stack.Setup

NewSetup creates a new empty Setup with nil system and nil orchestrator. The orchestrator can be configured with an option.

func Orchestrator

func Orchestrator() stack.Orchestrator

Orchestrator returns the globally configured orchestrator.

Add a TestMain to your test package init the orchestrator:

func TestMain(m *testing.M) {
    presets.DoMain(m)
}

func WithEmptySystem

func WithEmptySystem() stack.Option

WithEmptySystem attaches an empty system, for other options to add components to

func WithGlobalOrchestrator

func WithGlobalOrchestrator() stack.Option

WithGlobalOrchestrator attaches the main global Orchestrator() to the setup.

func WithTestLogger

func WithTestLogger() stack.Option

WithTestLogger attaches a test-logger

Types

type SimpleInterop

type SimpleInterop struct {
	Log        log.Logger
	System     *dsl.System
	Supervisor stack.Supervisor
}

func NewSimpleInterop

func NewSimpleInterop(t stack.T, opts ...stack.Option) *SimpleInterop

Jump to

Keyboard shortcuts

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