Documentation
¶
Index ¶
- Constants
- func DefaultConfigParser[T any](ver string, parser func(string) (*T, error)) *T
- func InitTimezone(zone string) error
- func InitVersionPrinter(printer func(string))
- func Run[T any](conf *T, builder func(*T) (*Application, error), options ...Option) error
- type Application
- type Hook
- type Option
Constants ¶
View Source
const DefaultTimezone = "Asia/Shanghai"
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigParser ¶
func InitTimezone ¶
func InitVersionPrinter ¶
func InitVersionPrinter(printer func(string))
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func NewApplication ¶
func NewApplication(tasks ...task.Task) *Application
func (*Application) Identifier ¶
func (a *Application) Identifier() string
type Option ¶
type Option func(*options)
func AddAfterStop ¶
func AddBeforeStart ¶
func AddBeforeStop ¶
func WithShutdownSignals ¶
func WithShutdownTimeout ¶
Click to show internal directories.
Click to hide internal directories.