vaddr

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasActive

func HasActive(s Suite) bool

func HasWrapper

func HasWrapper(s Suite) bool

func Split

func Split(s Suite) (Wrapper, Active)

Splits a Suite into a Wrapper that starts and stops all of the constituent wrappers in order and an Active that concurrently runs all of the constituent actives.

Types

type Active

type Active interface {
	Run(ctx context.Context) error
}

type ActiveFunc

type ActiveFunc func(ctx context.Context) error

func (ActiveFunc) Run

func (f ActiveFunc) Run(ctx context.Context) error

type Suite

type Suite struct {
	Wrappers []Wrapper
	Actives  []Active
}

func Join

func Join(s ...Suite) Suite

func (Suite) Run

func (s Suite) Run(ctx context.Context) (err error)

type Wrapper

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

type WrapperStruct

type WrapperStruct struct {
	StartFunc func() error
	StopFunc  func() error
}

func (WrapperStruct) Start

func (s WrapperStruct) Start() error

func (WrapperStruct) Stop

func (s WrapperStruct) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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