Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplications ¶
func NewApplications(components ...Component) *Application
func (*Application) AddComponent ¶
func (app *Application) AddComponent(c Component)
func (*Application) Run ¶
func (app *Application) Run() error
func (Application) WithLogger ¶ added in v0.1.4
func (app Application) WithLogger(logger Logger) Application
func (Application) WithTimeout ¶
func (app Application) WithTimeout(timeout time.Duration) Application
type Component ¶
type Component interface { // Synchronous startup, container runs this one by one Startup() error // Asynchronous run, container runs this in parrallel // Has to block until it's done // When one of componenst exits this func, container will start shutting down Run() error // Cleanup function Close(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.