sherlock

package
v0.0.94 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// V1
	AllocationPools *v1controllers.AllocationPoolController
	Services        *v1controllers.ServiceController
	Clusters        *v1controllers.ClusterController
	Builds          *v1controllers.BuildController
	Environments    *v1controllers.EnvironmentController
	Deploys         *v1controllers.DeployController

	Handler http.Handler
	// Used to pass the dbConn to testing setup helpers
	// without needing to instantiate a full model instance
	DB          *gorm.DB
	Stackdriver *stackdriver.Exporter
	// contains filtered or unexported fields
}

Application is the core application type containing a router and db connection repository is a wrapper type so we can define our own methods on the type holding the DB connection pool

func New

func New(db *gorm.DB) *Application

New returns a new instance of the core sherlock application

func (*Application) CancelContexts added in v0.0.23

func (a *Application) CancelContexts()

func (*Application) ServeHTTP

func (a *Application) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implments the http.Handler interface for a Sherlock application instance

func (*Application) ShutdownStackdriver added in v0.0.9

func (a *Application) ShutdownStackdriver()

ShutdownStackdriver is used to flush the metrics buffer and shutdown the exporter before sherlock itself closes

Jump to

Keyboard shortcuts

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