Documentation ¶
Index ¶
- Constants
- Variables
- func FileReportsView(wr http.ResponseWriter, req *http.Request)
- func HealthHandlerView(wr http.ResponseWriter, req *http.Request)
- func InjectWsContext(app *App, fn func(app *App, ws *websocket.Conn)) func(*websocket.Conn)
- func Middleware(a *App, endpoint APIendpoint) http.HandlerFunc
- func PrometheusHandlerView(wr http.ResponseWriter, req *http.Request)
- func TestHandlerView(wr http.ResponseWriter, req *http.Request)
- func WriteAllWebsockets(report *ustress.Report) error
- func WsServer(app *App, ws *websocket.Conn)
- type APIendpoint
- type App
- type Config
- type JSONResponse
- type StressTest
Constants ¶
View Source
const ScheduledTestTableName = "scheduled_test"
ScheduledTest is an incoming feature
View Source
const StressTestTableName = "stress_test"
Variables ¶
View Source
var NoDBConn = errors.New("No database connection")
View Source
var Tables = map[string]map[string]string{ StressTestTableName: map[string]string{ "id": "UUID PRIMARY KEY", "report": "text", "meta": "WITH default_time_to_live = " + "604800", }, }
Tables metadata that will be used to generate tables
Functions ¶
func FileReportsView ¶
func FileReportsView(wr http.ResponseWriter, req *http.Request)
func HealthHandlerView ¶
func HealthHandlerView(wr http.ResponseWriter, req *http.Request)
func InjectWsContext ¶
func Middleware ¶
func Middleware(a *App, endpoint APIendpoint) http.HandlerFunc
Middleware sets custom headers, and writes json response
func PrometheusHandlerView ¶
func PrometheusHandlerView(wr http.ResponseWriter, req *http.Request)
func TestHandlerView ¶
func TestHandlerView(wr http.ResponseWriter, req *http.Request)
func WriteAllWebsockets ¶
Types ¶
type APIendpoint ¶
APIendpoint ...
type App ¶
App will store app state, and other metadata alongside with utility functions
func NewAppFromEnv ¶
NewAppFromEnv Gets configuration from env
func NewAppFromYAML ¶
NewAppFromYAML inits the app from a yaml file
func (*App) InitSession ¶
InitSession initializes a cassandra session and attaches to the app struct
type Config ¶
func LocalCassandraConfig ¶
func LocalCassandraConfig() *Config
LocalCassandraConfig Used for development
type JSONResponse ¶
type JSONResponse map[string]interface{}
type StressTest ¶
func NewStressTest ¶
func NewStressTest(report *ustress.Report) *StressTest
Click to show internal directories.
Click to hide internal directories.