Documentation ¶
Index ¶
- Variables
- func MockCtx() *mockCtx
- func MockStart(s Service) func()
- func MountSpaUI(fs fs.FS) func(*mainServer) spaFS
- func ParseDuration(dur string) (result time.Duration, err error)
- func Run(ctx context.Context, f Factories)
- func Shrink(body string) string
- type Config
- type Context
- type Err
- type Fabric
- type Factories
- type MockRuntime
- type NotFound
- type Service
- type Singletons
Constants ¶
This section is empty.
Variables ¶
View Source
var Log passLogger
View Source
var Prefix = "slrp"
Prefix is the env var prefix
Functions ¶
func MountSpaUI ¶
func ParseDuration ¶
maybe not the most performant duration parser, but at least it supports days and weeks
Types ¶
type Context ¶
type Context interface { Ctx() context.Context // Propagates Done channel from parent context. Done() <-chan struct{} // Heartbeat used as signal to Fabric that marks related service for the next storage // flush event, in case BinaryMarshaller/BinaryUnmarshaller interfaces are implemented. // Second major use is as unit testing blocking hook. Heartbeat() }
type Factories ¶
type Factories map[string]interface{}
func (Factories) Init ¶
func (c Factories) Init() Singletons
type MockRuntime ¶
type MockRuntime map[string]*mockCtx
func MockStartSpin ¶ added in v0.0.4
func MockStartSpin[T any](this *T, other ...any) (*T, MockRuntime)
func (MockRuntime) Context ¶ added in v0.0.4
func (r MockRuntime) Context(main ...string) context.Context
func (MockRuntime) Stop ¶
func (r MockRuntime) Stop()
type Singletons ¶
type Singletons map[string]interface{}
func (Singletons) MockStart ¶
func (s Singletons) MockStart() MockRuntime
func (Singletons) Monitor ¶ added in v0.0.4
func (s Singletons) Monitor() *monitorServers
Click to show internal directories.
Click to hide internal directories.