service

package
v0.0.0-...-580ec26 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "basic_app"
View Source
const Version = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Cfg *config.Base
	// contains filtered or unexported fields
}

Base Container must contain all service shared by all command you must add service getter in this package you can add here you service definition complex service can have they're own package

func NewContainer

func NewContainer(cfg *config.Base) *Container

func (*Container) GetDocumentRepository

func (container *Container) GetDocumentRepository() repository.DocumentRepository

func (*Container) GetEsClient

func (container *Container) GetEsClient() *elastic.Client

func (*Container) GetHttpRecorder

func (container *Container) GetHttpRecorder() metrics.Recorder

func (*Container) GetIndexManager

func (container *Container) GetIndexManager() *esRepo.IndexManager

func (*Container) GetMetricsRegistry

func (container *Container) GetMetricsRegistry() prometheus.Registerer

func (*Container) GetMyContextualizedService

func (container *Container) GetMyContextualizedService(ctx context.Context) *MyContextualizeService

you need to define this kinf of service only when the service only live in context

func (*Container) GetMyLittleService

func (container *Container) GetMyLittleService() func()

func (*Container) Load

func (container *Container) Load() error

func (*Container) Unload

func (container *Container) Unload() error

type MyContextualizeService

type MyContextualizeService struct {
}

func (*MyContextualizeService) Find

func (m *MyContextualizeService) Find()

Jump to

Keyboard shortcuts

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