Documentation ¶
Index ¶
- func ContextWithApp(ctx context.Context, app *App) context.Context
- func FS() fs.FS
- func NewCookie(app *App, req bunrouter.Request) *http.Cookie
- func UnmarshalValues(req bunrouter.Request, filter any) error
- func WaitExitSignal() os.Signal
- type App
- func (app *App) Config() *bunconf.Config
- func (app *App) Context() context.Context
- func (app *App) Debug() bool
- func (app *App) Done() <-chan struct{}
- func (app *App) GRPCServer() *grpc.Server
- func (app *App) HTTPHandler() http.Handler
- func (app *App) InternalAPIV1() *bunrouter.Group
- func (app *App) OnStop(name string, fn HookFunc)
- func (app *App) OnStopped(name string, fn HookFunc)
- func (app *App) PublicAPIV1() *bunrouter.Group
- func (app *App) RegisterQueue(conf *taskq.QueueConfig) taskq.Queue
- func (app *App) RegisterTask(name string, conf *taskq.TaskConfig) *taskq.Task
- func (app *App) Router() *bunrouter.Router
- func (app *App) RouterGroup() *bunrouter.Group
- func (app *App) SiteURL(path string, args ...any) string
- func (app *App) Stop()
- func (app *App) WaitGroup() *sync.WaitGroup
- func (app *App) WithGlobalLock(ctx context.Context, fn func() error) error
- func (app *App) Zap(ctx context.Context) otelzap.LoggerWithCtx
- type HookFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitExitSignal ¶
Types ¶
type App ¶
type App struct { Logger *otelzap.Logger PG *bun.DB CH *ch.DB QueueFactory taskq.Factory MainQueue taskq.Queue HTTPClient *http.Client // contains filtered or unexported fields }
func AppFromContext ¶
func (*App) GRPCServer ¶
func (*App) HTTPHandler ¶
func (*App) InternalAPIV1 ¶ added in v1.7.0
func (*App) PublicAPIV1 ¶ added in v1.7.0
func (*App) RegisterQueue ¶
func (app *App) RegisterQueue(conf *taskq.QueueConfig) taskq.Queue
func (*App) RegisterTask ¶
func (*App) RouterGroup ¶
func (*App) WithGlobalLock ¶
Click to show internal directories.
Click to hide internal directories.