Documentation ¶
Index ¶
- func InitCustom(customApp App) error
- type App
- type AppBase
- func (appBase *AppBase) AddService(srv service.Service)
- func (appBase *AppBase) AppInfo() app.Info
- func (appBase *AppBase) InstanceID() string
- func (appBase *AppBase) IsAllServicesReady() bool
- func (appBase *AppBase) Run(ctx context.Context)
- func (appBase *AppBase) Services() []service.Service
- func (appBase *AppBase) Status() service.Status
- type InitOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App interface { app.App InstanceID() string AddService(service.Service) IsAllServicesReady() bool Run(context.Context) // Status reports the app's overall status including all services. // This method is designed to be used in health checks. Status() service.Status }
App abstracts the application itself. There should be only one instance for a running instance of an app.
type AppBase ¶
type AppBase struct {
// contains filtered or unexported fields
}
AppBase is the base layer for an app.
func (*AppBase) AddService ¶
AddService adds a service to be run simultaneously. Do NOT call this method after the app has been started.
func (*AppBase) InstanceID ¶
func (*AppBase) IsAllServicesReady ¶
IsAllServicesReady checks if every service is ready to accept clients.
func (*AppBase) Run ¶
Run runs all the services. Do NOT add any new service after this method was called.
Click to show internal directories.
Click to hide internal directories.