Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the core structure for a new service
func NewWithConfig ¶ added in v0.2.0
NewWithConfig creates a new App with the config config
func (*App) Drain ¶
func (a *App) Drain()
Drain notify all handlers to enter in draining mode. It means they are no longer accepting new requests, but they can finish all in-flight requests
func (*App) RegisterHandler ¶
RegisterHandler adds the given handler to the list of handlers
Directories ¶
Path | Synopsis |
---|---|
Package bg aims to manage all background jobs run on lego.
|
Package bg aims to manage all background jobs run on lego. |
Package config implements logic to load dynamic configuration from various sources It also defines environment specific configuration (dev, prod, ...)
|
Package config implements logic to load dynamic configuration from various sources It also defines environment specific configuration (dev, prod, ...) |
adapter/consul
Package consul reads configuration from the Consul KV store Consul is a highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy.
|
Package consul reads configuration from the Consul KV store Consul is a highly available and distributed service discovery and key-value store designed with support for the modern data center to make distributed systems and configuration easy. |
adapter/file
Package file reads configuration from a JSON file e.g.
|
Package file reads configuration from a JSON file e.g. |
Package ctx defines the context types, which carry information defined for a specific scope (application, request, ...) A context can be passed across API boundaries and between processes.
|
Package ctx defines the context types, which carry information defined for a specific scope (application, request, ...) A context can be passed across API boundaries and between processes. |
app
Package app defines an application context, which carries information about the application environment.
|
Package app defines an application context, which carries information about the application environment. |
journey
Package journey defines a context type, which carries information about a specific inbound request.
|
Package journey defines a context type, which carries information about a specific inbound request. |
Package handler contains the main logic to accept external requests.
|
Package handler contains the main logic to accept external requests. |
http
Package http is an extra layer on to of the standard go net/http package.
|
Package http is an extra layer on to of the standard go net/http package. |
Package log defines the logging facade A logger is composed of a formatter that serialises the log structure into a text line, and a log printer that outputs the formatted log lines.
|
Package log defines the logging facade A logger is composed of a formatter that serialises the log structure into a text line, and a log printer that outputs the formatted log lines. |
formatter/json
Package json is a JSON log formatter.
|
Package json is a JSON log formatter. |
formatter/logf
Package logf is a human friendly log formatter.
|
Package logf is a human friendly log formatter. |
printer/stdout
Package stdout prints log lines into the standard output.
|
Package stdout prints log lines into the standard output. |
Package stats provides functions for reporting metrics to a service.
|
Package stats provides functions for reporting metrics to a service. |
Package testing is an extension to the standard go testing package tailored for testing the lego framework.
|
Package testing is an extension to the standard go testing package tailored for testing the lego framework. |
Click to show internal directories.
Click to hide internal directories.