Documentation ¶
Index ¶
- func Init[T any](capacity int) map[string]T
- type Asyncable
- type Callable
- type Context
- type Option
- func Cancel() Option
- func Database(db sqlx.ExtContext) Option
- func Deadline(deadline time.Time) Option
- func Handler(k string, handler Callable) Option
- func Logger(l *zerolog.Logger) Option
- func Stream(k string, stream any) Option
- func Timeout(timeout time.Duration) Option
- func Transaction(tx sqlx.ExtContext) Option
- type Pluggable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Context ¶
type Context interface { context.Context Set(k string, v Pluggable) Get(k string) Pluggable Delete(k string) Ctx() context.Context Cancel() Stop() Options(opts ...Option) Context Stream(k string) Asyncable Streams() map[string]Asyncable AddHandler(k string, handler Callable) RemoveHandler(k string) Handler(k string) Callable Handlers() map[string]Callable }
New creates a new Context
type Option ¶
type Option func(ctx *container)
func Database ¶
func Database(db sqlx.ExtContext) Option
func Transaction ¶
func Transaction(tx sqlx.ExtContext) Option
Click to show internal directories.
Click to hide internal directories.