internal/component: Further optimize initialization
This commit is contained in:
parent
abc985892a
commit
84dcaa62a9
6 changed files with 280 additions and 294 deletions
|
|
@ -3,15 +3,12 @@ package component
|
|||
|
||||
// Component represents a logical subsystem of the distillery.
|
||||
// Every component must embed [ComponentBase] and should be initialized using [Initialize].
|
||||
// A Component should be implemented as a pointer to a struct.
|
||||
//
|
||||
// By convention these are defined within their corresponding subpackage.
|
||||
// This subpackage also contains all required resources.
|
||||
// Furthermore, a component is typically instantiated using a call on the ["distillery.Distillery"] struct.
|
||||
//
|
||||
// For example, the web.Web component lives in the web package and can be created like:
|
||||
//
|
||||
// var dis Distillery
|
||||
// web := dis.Web()
|
||||
// Components are initialized using a [Pool].
|
||||
type Component interface {
|
||||
// Name returns the name of this component.
|
||||
// It should correspond to the appropriate subpackage.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue