Documentation ¶
Overview ¶
Package sharedcomponent exposes functionality for components to register against a shared key, such as a configuration object, in order to be reused across signal types. This is particularly useful when the component relies on a shared resource such as os.File or http.Server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
Component ensures that the wrapped component is started and stopped only once. When stopped it is removed from the Map.
type Map ¶
type Map[K comparable, V component.Component] struct { // contains filtered or unexported fields }
Map keeps reference of all created instances for a given shared key such as a component configuration.
Click to show internal directories.
Click to hide internal directories.