Documentation
¶
Overview ¶
Package lazyservice provides a framework for building lazy applications in Go. A lazy application is an application that starts and stops services on demand. It allows you to define services as functions and run them within the application. The lazyapp package provides an interface for defining services, adding values and types to the application, and running the application and its services. It also provides a default logger implementation and supports colored debug messages and JSON logs. The application uses trace regions for the app and each of the services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { lazycontext.AppContext AddService(Service) Run() error }
func New ¶
func New() Manager
New creates a new app setting the name and version of the app. If the name is empty, it tries to use the base name of the executable. If the version is empty, it tries to use the modification time of the executable.
func NewWithContext ¶
NewWithContext creates a new app setting the name and version of the app and the context.
type ServiceDescription ¶
type ServiceDescription interface {
Name() string
}