Documentation ¶
Index ¶
- func GetContext() context.Context
- func NewContext(ctx context.Context, s AppInfo) context.Context
- type App
- func (a *App) Context() context.Context
- 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() (err error)
- func (a *App) Server(name string) transport.Server
- func (a *App) Stop() (err error)
- func (a *App) Version() string
- type AppInfo
- 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 Context(ctx context.Context) Option
- func ID(id string) Option
- func MetaData(metadata map[string]string) Option
- func Name(name string) Option
- func Registrar(registrar registry.Registrar) Option
- func Servers(srv ...transport.Server) Option
- func SigFunc(fn func(os.Signal) bool) Option
- func Version(version string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetContext ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
type AppInfo ¶
type AppInfo interface { ID() string Name() string Version() string Metadata() map[string]string Endpoint() []string Server(name string) transport.Server }
func FromContext ¶
FromContext returns the Transport value stored in ctx, if any.
Click to show internal directories.
Click to hide internal directories.