Documentation
¶
Index ¶
- func NewContext(ctx context.Context, s AppInfo) context.Context
- func Run(ctx context.Context, appInfo AppInfo, logger *slog.Logger, ...) error
- type AppInfo
- type RunOption
- func AfterStart(fn ...func(ctx context.Context) error) RunOption
- func AfterStop(fn ...func(ctx context.Context) error) RunOption
- func BeforeStart(fn ...func(ctx context.Context) error) RunOption
- func BeforeStop(fn ...func(ctx context.Context) error) RunOption
- func WithServers(server ...Server) RunOption
- func WithSignal(signal ...os.Signal) RunOption
- func WithStopTimeout(stopTimeout time.Duration) RunOption
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
NewContext returns a new Context that carries value.
Types ¶
type AppInfo ¶
func FromContext ¶
FromContext returns the Transport value stored in ctx, if any.
type RunOption ¶ added in v0.1.18
type RunOption func(*runner)
func WithServers ¶ added in v0.1.18
func WithSignal ¶
func WithStopTimeout ¶
Click to show internal directories.
Click to hide internal directories.