Versions in this module Expand all Collapse all v1 v1.1.1 Sep 15, 2026 Changes in this version + const HeaderColorTag + const HeaderTraceID + const HeaderUserID + var ErrAppAlreadyRunning = errors.New("wind: App.Run already called") + func GetColorTag(ctx context.Context) string + func GetMetadata(ctx context.Context, key string) string + func GetTraceID(ctx context.Context) string + func GetUserID(ctx context.Context) string + func NewMetadataContext(ctx context.Context, md Metadata) context.Context + func WithColorTag(ctx context.Context, tag string) context.Context + func WithMetadata(ctx context.Context, key, value string) context.Context + func WithMetadatas(ctx context.Context, extra Metadata) context.Context + func WithTraceID(ctx context.Context, traceID string) context.Context + func WithUserID(ctx context.Context, userID string) context.Context + func WithoutMetadata(ctx context.Context, key string) context.Context + type App struct + func New(opts ...Option) *App + func (a *App) Done() <-chan struct{} + func (a *App) Err() error + func (a *App) ID() string + func (a *App) Instance(endpoints ...string) *Instance + func (a *App) InstanceID() string + func (a *App) Logger() log.Logger + func (a *App) Name() string + func (a *App) Run(ctx context.Context) error + func (a *App) Stop(ctx context.Context) error + func (a *App) Version() string + type Instance struct + Endpoints []string + ID string + Metadata map[string]string + Name string + Version string + func (i *Instance) FirstEndpoint() string + type Metadata map[string]string + func MetadataFromContext(ctx context.Context) (Metadata, bool) + type Option func(*App) + func WithAfterStop(fn func(ctx context.Context) error) Option + func WithBanner(enabled bool) Option + func WithBeforeStop(fn func(ctx context.Context) error) Option + func WithID(id string) Option + func WithInstanceID(id string) Option + func WithLogger(l log.Logger) Option + func WithName(name string) Option + func WithServer(srv ...transport.Server) Option + func WithSignal(sigs ...os.Signal) Option + func WithStopTimeout(d time.Duration) Option + func WithVersion(version string) Option