modules

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStartFuncMissing = errors.Base("module has no start function")
	ErrStartFuncNil     = errors.Base("module start function is nil")
)

Functions

This section is empty.

Types

type Module

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

func NewModule

func NewModule(name string, version *semver.SemVer) *Module

func (*Module) Name

func (m *Module) Name() string

func (*Module) SetStartFn

func (m *Module) SetStartFn(fn StartFn)

func (*Module) Start

func (m *Module) Start(ctx context.Context, lgr logger.Logger) (bool, error)

func (*Module) StartFn

func (m *Module) StartFn() StartFn

func (*Module) Version

func (m *Module) Version() *semver.SemVer

type StartFn

type StartFn func(context.Context, logger.Logger) (bool, error)

Jump to

Keyboard shortcuts

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