Versions in this module Expand all Collapse all v2 v2.8.2 Nov 1, 2024 v2.8.1 Nov 1, 2024 Changes in this version + const Release + func NewContext(ctx context.Context, s AppInfo) context.Context + type App struct + func New(opts ...Option) *App + func (a *App) Endpoint() []string + func (a *App) ID() string + func (a *App) Metadata() map[string]string + func (a *App) Name() string + func (a *App) Run() error + func (a *App) Stop() (err error) + func (a *App) Version() string + type AppInfo interface + Endpoint func() []string + ID func() string + Metadata func() map[string]string + Name func() string + Version func() string + func FromContext(ctx context.Context) (s AppInfo, ok bool) + type Option func(o *options) + 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 Logger(logger log.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