appcontext

package
v0.0.0-...-ffe04fe Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppContext

type AppContext struct {
	Ctx       context.Context
	CtxCancel context.CancelFunc
	Eg        *errgroup.Group
	AppErrors []error
	Logger    zerolog.Logger
	Config    config.Config
	IsLive    bool

	Olymptrade     gowebsocket.Socket
	OlymptradeOnce sync.Once
	RedisPool      *redis.Pool
}

AppContext ...

func NewAppContext

func NewAppContext(ctx context.Context, ctxCancel context.CancelFunc, eg *errgroup.Group) *AppContext

NewAppContext ...

func (*AppContext) InitAppErrors

func (a *AppContext) InitAppErrors(appErr ...error)

InitAppErrors ...

func (*AppContext) InitConfig

func (a *AppContext) InitConfig(cfg config.Config) (err error)

InitConfig ...

func (*AppContext) InitLogger

func (a *AppContext) InitLogger(logger zerolog.Logger) (err error)

InitLogger ...

func (*AppContext) InitOlymptrade

func (a *AppContext) InitOlymptrade() (err error)

InitOlymptrade ...

func (*AppContext) InitRedisPool

func (a *AppContext) InitRedisPool() (err error)

InitRedisPool ...

Jump to

Keyboard shortcuts

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