Documentation ¶
Index ¶
- Constants
- Variables
- func InstrumentTesterByTypeAssertion[T any](v any) bool
- func IsSettingRootKey(key string) bool
- func ResolveInstrumentByType[T any](ib *InstrumentBank, name string) T
- type Application
- type ApplicationConstructor
- type Decapsulator
- type DecapsulatorFunc
- type Driver
- type DriverConstructor
- type Encapsulator
- type EncapsulatorFunc
- type Hook
- type Instrument
- type InstrumentBank
- type InstrumentCatalogue
- type InstrumentConstructor
- type InstrumentInjector
- type Kernel
- func (k Kernel) AfterStart(hh ...Hook) Kernel
- func (k Kernel) Connect(cc ...DriverConstructor) Kernel
- func (k Kernel) Equip(cc ...InstrumentInjector) Kernel
- func (k Kernel) Feed(ss ...SettingSource) Kernel
- func (k Kernel) Install(cc ...ApplicationConstructor) Kernel
- func (k Kernel) Run(ctx context.Context) error
- type Marshaler
- type MarshalerFunc
- type Option
- type Route
- type Router
- type RouterFunc
- type SettingSource
- type Settings
- func (ss *Settings) Append(source SettingSource)
- func (ss *Settings) Children(key string) []string
- func (ss *Settings) GetBool(key string) bool
- func (ss *Settings) GetByte(key string) byte
- func (ss *Settings) GetDuration(key string) time.Duration
- func (ss *Settings) GetInt(key string) int
- func (ss *Settings) GetInt64(key string) int64
- func (ss *Settings) GetString(key string) string
- func (ss *Settings) GetStringSlice(key string) []string
- func (ss *Settings) Prepend(source SettingSource)
- func (ss *Settings) UnmarshalJson(key string, valPtr any) error
- type Unmarshaler
- type UnmarshalerFunc
Constants ¶
View Source
const SettingKeyDelimiter = "."
Variables ¶
Functions ¶
func IsSettingRootKey ¶ added in v0.13.0
func ResolveInstrumentByType ¶
func ResolveInstrumentByType[T any](ib *InstrumentBank, name string) T
Types ¶
type Application ¶
type Application interface { }
type ApplicationConstructor ¶
type ApplicationConstructor func(ss *Settings, ib *InstrumentBank) Application
type Decapsulator ¶ added in v0.9.0
type DecapsulatorFunc ¶ added in v0.9.0
func (DecapsulatorFunc[M]) Decapsulate ¶ added in v0.9.0
func (f DecapsulatorFunc[M]) Decapsulate(msg M) ([]byte, error)
type DriverConstructor ¶
type DriverConstructor func(ss *Settings, ib *InstrumentBank, apps []Application) Driver
type Encapsulator ¶ added in v0.9.0
type EncapsulatorFunc ¶ added in v0.10.1
func (EncapsulatorFunc[M]) Encapsulate ¶ added in v0.10.1
func (f EncapsulatorFunc[M]) Encapsulate(route Route, data []byte) M
type Hook ¶
type Hook func(ctx context.Context, ss *Settings, ib *InstrumentBank, apps []Application) error
type Instrument ¶
type Instrument interface{}
type InstrumentBank ¶
type InstrumentBank struct {
// contains filtered or unexported fields
}
func (*InstrumentBank) Resolve ¶
func (ib *InstrumentBank) Resolve(name string, tester func(v any) bool) Instrument
type InstrumentCatalogue ¶
type InstrumentCatalogue struct { Names []string Builder InstrumentConstructor }
type InstrumentConstructor ¶
type InstrumentConstructor func(ss *Settings, ib *InstrumentBank) Instrument
type InstrumentInjector ¶ added in v0.6.0
type InstrumentInjector func(ss *Settings) []InstrumentCatalogue
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func (Kernel) AfterStart ¶
func (Kernel) Connect ¶
func (k Kernel) Connect(cc ...DriverConstructor) Kernel
Connect binds driver(s) to the Kernel in order to invoke use-cases on (drive) installed applications
func (Kernel) Equip ¶
func (k Kernel) Equip(cc ...InstrumentInjector) Kernel
Equip plugs instruments which can get resolved by the instrument bank that is passed to unit constructors
func (Kernel) Feed ¶
func (k Kernel) Feed(ss ...SettingSource) Kernel
Feed injects setting sources to be fed into configurable units like instruments, applications and drivers
func (Kernel) Install ¶
func (k Kernel) Install(cc ...ApplicationConstructor) Kernel
Install appends installable applications to the list which become created on Run
type MarshalerFunc ¶ added in v0.9.0
func (MarshalerFunc) Marshal ¶ added in v0.9.0
func (f MarshalerFunc) Marshal(payload any) []byte
type Option ¶
func Connector ¶
func Connector(cc ...DriverConstructor) Option
func Equipment ¶
func Equipment(cc ...InstrumentInjector) Option
func Feeder ¶
func Feeder(ss ...SettingSource) Option
func Installer ¶
func Installer(cc ...ApplicationConstructor) Option
type RouterFunc ¶ added in v0.9.0
func (RouterFunc) Resolve ¶ added in v0.9.0
func (f RouterFunc) Resolve(addr string) Route
type SettingSource ¶
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func (*Settings) Append ¶ added in v0.7.0
func (ss *Settings) Append(source SettingSource)
func (*Settings) GetDuration ¶ added in v0.7.1
func (*Settings) GetStringSlice ¶ added in v0.5.0
func (*Settings) Prepend ¶ added in v0.7.0
func (ss *Settings) Prepend(source SettingSource)
type Unmarshaler ¶ added in v0.9.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.