Documentation
¶
Overview ¶
Package private is an internal holder of state that different Service Weaver packages share without exposing it externally. E.g., if module X wants to expose a function to module Y without making it public, X can store the function in a variable in private and Y can read it from there.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Start func(ctx context.Context, options AppOptions) (App, error)
Starts starts a Service Weaver application.
Functions ¶
This section is empty.
Types ¶
type App ¶ added in v0.13.0
type App interface {
// Get fetches the component with interface type t from wlet.
Get(requester string, t reflect.Type) (any, error)
// GetImpl fetches the component implementation with type t from wlet.
GetImpl(requester string, t reflect.Type) (any, error)
}
App is an internal handle to a Service Weaver application.
type AppOptions ¶ added in v0.13.0
type AppOptions struct {
// Fakes holds a mapping from component interface type to the fake
// implementation to use for that component.
Fakes map[reflect.Type]any
}
AppOptions controls a Service Weaver application execution.
Click to show internal directories.
Click to hide internal directories.