container

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	logging.Logger

	Services map[string]service.HTTP

	Redis *redis.Redis
	DB    *sql.DB
	// contains filtered or unexported fields
}

Container is a collection of all common application level concerns. Things like Logger, Connection Pool for Redis etc which is shared across is placed here.

func NewContainer

func NewContainer(conf config.Config) *Container

func (*Container) GetAppName added in v0.2.0

func (c *Container) GetAppName() string

func (*Container) GetAppVersion added in v0.2.0

func (c *Container) GetAppVersion() string

func (*Container) GetHTTPService

func (c *Container) GetHTTPService(serviceName string) service.HTTP

GetHTTPService returns registered http services. HTTP services are registered from AddHTTPService method of gofr object.

func (*Container) Health

func (c *Container) Health(ctx context.Context) interface{}

func (*Container) Metrics added in v0.2.0

func (c *Container) Metrics() metrics.Manager

Jump to

Keyboard shortcuts

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