startable

package
v0.0.0-...-ed34e12 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 1 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeStartable

func MakeStartable(startFunc func() error, stopFunc func()) *startableWrapper

Types

type Startable

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

Exported to support embedding

func NewStartable

func NewStartable(startables ...StartableIfc) *Startable

func (*Startable) AddStartables

func (r *Startable) AddStartables(startables ...StartableIfc) *Startable

func (*Startable) IsStarted

func (r *Startable) IsStarted() bool

func (*Startable) Start

func (r *Startable) Start() error

Start everything; nil error indicates success

func (*Startable) Stop

func (r *Startable) Stop()

type StartableIfc

type StartableIfc interface {
	AddStartables(startables ...StartableIfc) *Startable
	Start() error
	IsStarted() bool
	Stop()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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