app

package
v0.0.0-...-3f5ce87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Cfg      *config.Config
	Log      *zap.Logger
	LogLevel zap.AtomicLevel

	MeterProvider  *sdkmetric.MeterProvider
	TracerProvider *sdktrace.TracerProvider

	DebugServer   *debug.Server
	MetricsServer *telemetry.MetricsServer

	RedisOpt  asynq.RedisClientOpt
	WorkQueue work.Queue
}

Container provides common dependencies for the app, and handles their lifecycle.

func NewContainer

func NewContainer(cfg *config.Config, log *zap.Logger, logLevel zap.AtomicLevel) (*Container, error)

func (*Container) Close

func (ct *Container) Close()

func (*Container) NewAsynqScheduler

func (ct *Container) NewAsynqScheduler() (*asynq.Scheduler, error)

func (*Container) NewAsynqServeMux

func (ct *Container) NewAsynqServeMux() (*asynq.ServeMux, error)

func (*Container) NewAsynqServer

func (ct *Container) NewAsynqServer() *asynq.Server

func (*Container) RunServer

func (ct *Container) RunServer(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL