Documentation ¶
Index ¶
- type Container
- func (c *Container) Create(conf config.Config)
- func (c *Container) GetAppName() string
- func (c *Container) GetAppVersion() string
- func (c *Container) GetHTTPService(serviceName string) service.HTTP
- func (c *Container) GetPublisher() pubsub.Publisher
- func (c *Container) GetSubscriber() pubsub.Subscriber
- func (c *Container) Health(ctx context.Context) interface{}
- func (c *Container) Metrics() metrics.Manager
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 PubSub pubsub.Client Redis *redis.Redis SQL *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 NewEmptyContainer ¶ added in v1.1.1
func NewEmptyContainer() *Container
func (*Container) GetAppName ¶ added in v0.2.0
func (*Container) GetAppVersion ¶ added in v0.2.0
func (*Container) GetHTTPService ¶
GetHTTPService returns registered http services. HTTP services are registered from AddHTTPService method of gofr object.
func (*Container) GetPublisher ¶ added in v1.1.1
func (*Container) GetSubscriber ¶ added in v1.1.1
func (c *Container) GetSubscriber() pubsub.Subscriber
Click to show internal directories.
Click to hide internal directories.