Documentation ¶
Index ¶
- Variables
- type Application
- func (app *Application) Run(setup ServiceSetup)
- func (app *Application) Shutdown(handler func()) *Application
- func (app *Application) WithContext(ctx context.Context) *Application
- func (app *Application) WithDisableSystemServer(disable bool) *Application
- func (app *Application) WithEnvironment(environment string) *Application
- func (app *Application) WithLoggerZapOptions(options ...zap.Option) *Application
- func (app *Application) WithName(value string) *Application
- func (app *Application) WithSkipConfig(skip bool) *Application
- func (app *Application) WithVersion(version, build, buildDate string) *Application
- func (app *Application) WithZapConfigModifier(f func(*zap.Config)) *Application
- type HealthChecker
- type ReadyChecker
- type ServiceSetup
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the version of the application. It can be set from using LDFLAGS. Version = "" // Build is the commit hash originated the build version. It can be set from using LDFLAGS. Build = "" // BuildDate is the timestamp informing when the app was built. It can be set from using LDFLAGS. BuildDate = "" )
View Source
var (
ErrAppNotRunningYet = errors.New("app is not running yet")
)
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { ConfigManager *config.Manager Runner *goservices.Runner // contains filtered or unexported fields }
func New ¶
func New() *Application
func (*Application) Run ¶
func (app *Application) Run(setup ServiceSetup)
func (*Application) Shutdown ¶
func (app *Application) Shutdown(handler func()) *Application
func (*Application) WithContext ¶
func (app *Application) WithContext(ctx context.Context) *Application
func (*Application) WithDisableSystemServer ¶ added in v0.2.0
func (app *Application) WithDisableSystemServer(disable bool) *Application
func (*Application) WithEnvironment ¶
func (app *Application) WithEnvironment(environment string) *Application
func (*Application) WithLoggerZapOptions ¶ added in v0.2.0
func (app *Application) WithLoggerZapOptions(options ...zap.Option) *Application
func (*Application) WithName ¶ added in v0.3.0
func (app *Application) WithName(value string) *Application
func (*Application) WithSkipConfig ¶ added in v0.6.0
func (app *Application) WithSkipConfig(skip bool) *Application
WithSkipConfig skips the configuration loading when this instance runs.
func (*Application) WithVersion ¶
func (app *Application) WithVersion(version, build, buildDate string) *Application
WithVersion customizes the version of the application. Deprecated: Now the versions are extracted automatically from the go1.18 buildinfo.
func (*Application) WithZapConfigModifier ¶ added in v0.7.0
func (app *Application) WithZapConfigModifier(f func(*zap.Config)) *Application
type HealthChecker ¶ added in v0.2.0
type ReadyChecker ¶ added in v0.2.0
type ServiceSetup ¶
type ServiceSetup func(ctx context.Context, app *Application) ([]goservices.Service, error)
ServiceSetup is the handler that is pased to the Application.Run receiver.
Click to show internal directories.
Click to hide internal directories.