Documentation ¶
Index ¶
- type Next
- type Option
- func AfterStart(fn func(context.Context) error) Option
- func AfterStop(fn func(context.Context) error) Option
- func BeforeStart(fn func(context.Context) error) Option
- func BeforeStop(fn func(context.Context) error) Option
- func Context(ctx context.Context) Option
- func Endpoint(endpoints ...*url.URL) Option
- func ID(id string) Option
- func Loader(loader ...loader.Loader) Option
- func Logger(logger logger.Logger) Option
- func Metadata(md map[string]string) Option
- func Name(name string) Option
- func Registrar(r registry.Registrar) Option
- func RegistrarTimeout(t time.Duration) Option
- func Server(srv ...transport.Server) Option
- func Signal(sigs ...os.Signal) Option
- func StopTimeout(t time.Duration) Option
- func Version(version string) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *Options)
Option is an application option.
func AfterStart ¶
AfterStart run funcs after app starts
func BeforeStart ¶
BeforeStart run funcs before app starts
func BeforeStop ¶
BeforeStop run funcs before app stops
func RegistrarTimeout ¶
RegistrarTimeout with Registrar timeout.
type Options ¶
type Options struct { ID string Name string Version string Metadata map[string]string Endpoints []*url.URL Ctx context.Context Sigs []os.Signal Logger logger.Logger Registrar registry.Registrar RegistrarTimeout time.Duration StopTimeout time.Duration Loader []loader.Loader Servers []transport.Server // Before and After funcs BeforeStart []func(context.Context) error BeforeStop []func(context.Context) error AfterStart []func(context.Context) error AfterStop []func(context.Context) error }
Options is an application options.
Directories ¶
Path | Synopsis |
---|---|
adapter
|
|
broker/kafka/otelsarama
Package otelsarama instruments the github.com/Shopify/sarama package.
|
Package otelsarama instruments the github.com/Shopify/sarama package. |
api
|
|
Package broker is an interface used for asynchronous messaging
|
Package broker is an interface used for asynchronous messaging |
internal
|
|
group
Package group provides a sample lazy load container.
|
Package group provides a sample lazy load container. |
pkg
|
|
transport
|
|
Click to show internal directories.
Click to hide internal directories.