Documentation
¶
Index ¶
- type ExternalServiceList
- 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) GetS3StaticFileUploader(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
- func (e *ExternalServiceList) GetS3Uploaded(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
- type HTTPServer
- type HealthChecker
- type Init
- 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) DoGetS3Uploaded(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
- func (e *Init) DoGetStaticFileS3Uploader(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
- type Initialiser
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalServiceList ¶ added in v0.3.0
type ExternalServiceList struct { S3Uploaded bool HealthCheck bool Init Initialiser }
ExternalServiceList holds the initialiser and initialisation state of external services.
func NewServiceList ¶ added in v0.3.0
func NewServiceList(initialiser Initialiser) *ExternalServiceList
NewServiceList creates a new service list with the provided initialiser
func (*ExternalServiceList) GetHTTPServer ¶ added in v0.3.0
func (e *ExternalServiceList) GetHTTPServer(bindAddr string, router http.Handler) HTTPServer
GetHTTPServer creates an http server
func (*ExternalServiceList) GetHealthCheck ¶ added in v0.3.0
func (e *ExternalServiceList) GetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
GetHealthCheck creates a healthcheck with versionInfo and sets teh HealthCheck flag to true
func (*ExternalServiceList) GetS3StaticFileUploader ¶ added in v1.2.0
func (e *ExternalServiceList) GetS3StaticFileUploader(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
func (*ExternalServiceList) GetS3Uploaded ¶ added in v0.3.0
func (e *ExternalServiceList) GetS3Uploaded(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
GetS3Uploaded creates a S3 client and sets the S3Uploaded flag to true
type HTTPServer ¶ added in v0.3.0
HTTPServer defines the required methods from the HTTP server
type HealthChecker ¶ added in v0.3.0
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 ¶ added in v0.3.0
type Init struct{}
Init implements the Initialiser interface to initialise dependencies
func (*Init) DoGetHTTPServer ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (e *Init) DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error)
DoGetHealthCheck creates a healthcheck with versionInfo
func (*Init) DoGetS3Uploaded ¶ added in v0.3.0
DoGetS3Uploaded returns a S3Client
func (*Init) DoGetStaticFileS3Uploader ¶ added in v1.2.0
func (e *Init) DoGetStaticFileS3Uploader(ctx context.Context, cfg *config.Config) (dpaws.S3Clienter, error)
DoGetStaticFileS3Uploader returns a S3Client
type Initialiser ¶ added in v0.3.0
type Initialiser interface { DoGetHTTPServer(bindAddr string, router http.Handler) HTTPServer DoGetHealthCheck(cfg *config.Config, buildTime, gitCommit, version string) (HealthChecker, error) DoGetS3Uploaded(ctx context.Context, cfg *config.Config) (aws.S3Clienter, error) DoGetStaticFileS3Uploader(ctx context.Context, cfg *config.Config) (aws.S3Clienter, error) }
Initialiser defines the methods to initialise external services
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service contains all the configs, server and clients to run the dp-upload-service API