Documentation ¶
Index ¶
- type ExternalServiceList
- func (e *ExternalServiceList) GetAuthorisationHandlers(ctx context.Context, cfg *config.Config) api.AuthHandler
- func (e *ExternalServiceList) GetHTTPServer(bindAddr string, router http.Handler) HTTPServer
- func (e *ExternalServiceList) GetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
- func (e *ExternalServiceList) GetHealthClient(name, url string) *health.Client
- func (e *ExternalServiceList) GetMongoDB(ctx context.Context, cfg *config.Config) (MongoDataStorer, error)
- type HTTPServer
- type HealthChecker
- type Init
- func (e *Init) DoGetAuthorisationHandlers(ctx context.Context, cfg *config.Config) api.AuthHandler
- func (e *Init) DoGetHTTPServer(bindAddr string, router http.Handler) HTTPServer
- func (e *Init) DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
- func (e *Init) DoGetHealthClient(name, url string) *health.Client
- func (e *Init) DoGetMongoDB(ctx context.Context, cfg *config.Config) (MongoDataStorer, error)
- type Initialiser
- type MongoDataStorer
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalServiceList ¶
type ExternalServiceList struct { MongoDB bool HealthCheck bool Auth bool Init Initialiser }
ExternalServiceList holds the initialiser and initialisation state of external services.
func NewServiceList ¶
func NewServiceList(initialiser Initialiser) *ExternalServiceList
NewServiceList creates a new service list with the provided initialiser
func (*ExternalServiceList) GetAuthorisationHandlers ¶ added in v0.9.0
func (e *ExternalServiceList) GetAuthorisationHandlers(ctx context.Context, cfg *config.Config) api.AuthHandler
GetAuthorisationHandlers creates an AuthHandler client and sets the Auth flag to true
func (*ExternalServiceList) GetHTTPServer ¶
func (e *ExternalServiceList) GetHTTPServer(bindAddr string, router http.Handler) HTTPServer
GetHTTPServer creates an http server
func (*ExternalServiceList) GetHealthCheck ¶
func (e *ExternalServiceList) GetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
GetHealthCheck creates a healthCheck with versionInfo and sets the HealthCheck flag to true
func (*ExternalServiceList) GetHealthClient ¶ added in v0.5.0
func (e *ExternalServiceList) GetHealthClient(name, url string) *health.Client
GetHealthClient returns a healthClient for the provided URL
func (*ExternalServiceList) GetMongoDB ¶ added in v0.5.0
func (e *ExternalServiceList) GetMongoDB(ctx context.Context, cfg *config.Config) (MongoDataStorer, error)
GetMongoDB creates a mongoDB client and sets the Mongo flag to true
type HTTPServer ¶
HTTPServer defines the required methods from the HTTP server
type HealthChecker ¶
type HealthChecker interface { Handler(w http.ResponseWriter, req *http.Request) Start(ctx context.Context) Stop() AddCheck(name string, checker healthcheck.Checker) (err error) }
HealthChecker defines the required methods from HealthCheck
type Init ¶
type Init struct{}
Init implements the Initialiser interface to initialise dependencies
func (*Init) DoGetAuthorisationHandlers ¶ added in v0.9.0
func (*Init) DoGetHTTPServer ¶
func (e *Init) DoGetHTTPServer(bindAddr string, router http.Handler) HTTPServer
DoGetHTTPServer creates an HTTP Server with the provided bind address and router
func (*Init) DoGetHealthCheck ¶
func (e *Init) DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
DoGetHealthCheck creates a healthCheck with versionInfo
func (*Init) DoGetHealthClient ¶ added in v0.5.0
DoGetHealthClient creates a new Health Client for the provided name and url
func (*Init) DoGetMongoDB ¶ added in v0.5.0
DoGetMongoDB returns a MongoDB
type Initialiser ¶
type Initialiser interface { DoGetHTTPServer(bindAddr string, router http.Handler) HTTPServer DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error) DoGetHealthClient(name, url string) *health.Client DoGetMongoDB(ctx context.Context, cfg *config.Config) (MongoDataStorer, error) DoGetAuthorisationHandlers(ctx context.Context, cfg *config.Config) api.AuthHandler }
Initialiser defines the methods to initialise external services
type MongoDataStorer ¶ added in v0.10.0
type MongoDataStorer interface { api.DataStorer Close(ctx context.Context) error Checker(ctx context.Context, state *healthcheck.CheckState) (err error) }
MongoDataStorer defines the required methods for a Mongo DB Jobstore
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service contains all the configs, server and clients to run the Search Reindex API