Documentation ¶
Overview ¶
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers :collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Package handlers : collection of handlers (aka "HTTP middleware")
Index ¶
- func NewHandlerInstance(handlerConfig *models.HandlerConfig) models.HandlerInterface
- func ServeUI(w http.ResponseWriter, r *http.Request, reqBasePath, baseFolderPath string)
- type Handler
- func (h *Handler) AdapterPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) AnonymousStatsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) AuthMiddleware(next http.Handler) http.Handler
- func (h *Handler) CollectStaticMetrics(config *models.SubmitMetricsConfig) error
- func (h *Handler) EventStreamHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) FetchResultsHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, ...)
- func (h *Handler) GetAllAdaptersHandler(w http.ResponseWriter, req *http.Request, provider models.Provider)
- func (h *Handler) GetContextsFromK8SConfig(w http.ResponseWriter, req *http.Request)
- func (h *Handler) GetResultHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, ...)
- func (h *Handler) GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) GrafanaConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) GrafanaPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) GrafanaQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) InstalledMeshesHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) K8SConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) KubernetesPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) LoadTestHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) LoadTestPrefencesHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) LoadTestUsingSMPSHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) LoginHandler(w http.ResponseWriter, r *http.Request, p models.Provider, fromMiddleWare bool)
- func (h *Handler) LogoutHandler(w http.ResponseWriter, req *http.Request, p models.Provider)
- func (h *Handler) MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) MeshOpsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) PrometheusConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) PrometheusPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) PrometheusQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) ProviderHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProviderMiddleware(next http.Handler) http.Handler
- func (h *Handler) ProviderUIHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) ProvidersHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) SaveSelectedPrometheusBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) ScanGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) ScanPromGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) ScanPromotheusHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) ServerVersionHandler(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SessionInjectorMiddleware(...) http.Handler
- func (h *Handler) SessionSyncHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, ...)
- func (h *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, p models.Provider, fromMiddleWare bool)
- func (h *Handler) UserHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, ...)
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandlerInstance ¶ added in v0.0.4
func NewHandlerInstance( handlerConfig *models.HandlerConfig, ) models.HandlerInterface
NewHandlerInstance returns a Handler instance
Types ¶
type Handler ¶ added in v0.0.4
type Handler struct {
// contains filtered or unexported fields
}
Handler type is the bucket for configs and http handlers
func (*Handler) AdapterPingHandler ¶ added in v0.0.6
func (h *Handler) AdapterPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
AdapterPingHandler is used to ping a given adapter
func (*Handler) AnonymousStatsHandler ¶ added in v0.3.7
func (h *Handler) AnonymousStatsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
AnonymousStatsHandler updates anonymous stats for user
func (*Handler) AuthMiddleware ¶ added in v0.0.4
AuthMiddleware is a middleware to validate if a user is authenticated
func (*Handler) CollectStaticMetrics ¶ added in v0.0.6
func (h *Handler) CollectStaticMetrics(config *models.SubmitMetricsConfig) error
CollectStaticMetrics is used for collecting static metrics from prometheus and submitting it to SaaS
func (*Handler) EventStreamHandler ¶ added in v0.0.6
func (h *Handler) EventStreamHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, _ models.Provider)
EventStreamHandler endpoint is used for streaming events to the frontend
func (*Handler) FetchResultsHandler ¶ added in v0.0.6
func (h *Handler) FetchResultsHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, user *models.User, p models.Provider)
FetchResultsHandler fetchs pages of results from SaaS and presents it to the UI
func (*Handler) GetAllAdaptersHandler ¶ added in v0.0.6
func (h *Handler) GetAllAdaptersHandler(w http.ResponseWriter, req *http.Request, provider models.Provider)
GetAllAdaptersHandler is used to fetch all the adapters
func (*Handler) GetContextsFromK8SConfig ¶ added in v0.0.6
func (h *Handler) GetContextsFromK8SConfig(w http.ResponseWriter, req *http.Request)
GetContextsFromK8SConfig returns the context list for a given k8s config
func (*Handler) GetResultHandler ¶ added in v0.3.10
func (h *Handler) GetResultHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, user *models.User, p models.Provider)
GetResultHandler gets an individual result from provider
func (*Handler) GrafanaBoardImportForPrometheusHandler ¶ added in v0.0.6
func (h *Handler) GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
GrafanaBoardImportForPrometheusHandler accepts a Grafana board json, parses it and returns the list of panels
func (*Handler) GrafanaBoardsHandler ¶ added in v0.0.6
func (h *Handler) GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
GrafanaBoardsHandler is used for fetching Grafana boards and panels
func (*Handler) GrafanaConfigHandler ¶ added in v0.0.6
func (h *Handler) GrafanaConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
GrafanaConfigHandler is used for persisting or removing Grafana configuration
func (*Handler) GrafanaPingHandler ¶ added in v0.3.5
func (h *Handler) GrafanaPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
GrafanaPingHandler - used to initiate a Grafana ping
func (*Handler) GrafanaQueryHandler ¶ added in v0.0.6
func (h *Handler) GrafanaQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
GrafanaQueryHandler is used for handling Grafana queries
func (*Handler) GrafanaQueryRangeHandler ¶ added in v0.0.6
func (h *Handler) GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
GrafanaQueryRangeHandler is used for handling Grafana Range queries
func (*Handler) InstalledMeshesHandler ¶ added in v0.2.0
func (h *Handler) InstalledMeshesHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
InstalledMeshesHandler - scans and tries to find out the installed meshes
func (*Handler) K8SConfigHandler ¶ added in v0.0.4
func (h *Handler) K8SConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
K8SConfigHandler is used for persisting kubernetes config and context info
func (*Handler) KubernetesPingHandler ¶ added in v0.1.6
func (h *Handler) KubernetesPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
KubernetesPingHandler - fetches server version to simulate ping
func (*Handler) LoadTestHandler ¶ added in v0.0.4
func (h *Handler) LoadTestHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
LoadTestHandler runs the load test with the given parameters
func (*Handler) LoadTestPrefencesHandler ¶ added in v0.3.7
func (h *Handler) LoadTestPrefencesHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
LoadTestPrefencesHandler is used for persisting load test preferences
func (*Handler) LoadTestUsingSMPSHandler ¶ added in v0.3.10
func (h *Handler) LoadTestUsingSMPSHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
LoadTestUsingSMPSHandler runs the load test with the given parameters and SMPS
func (*Handler) LoginHandler ¶ added in v0.0.4
func (h *Handler) LoginHandler(w http.ResponseWriter, r *http.Request, p models.Provider, fromMiddleWare bool)
LoginHandler redirects user for auth or issues session
func (*Handler) LogoutHandler ¶ added in v0.0.4
LogoutHandler destroys the session and redirects to home.
func (*Handler) MeshAdapterConfigHandler ¶ added in v0.0.6
func (h *Handler) MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
MeshAdapterConfigHandler is used to persist adapter config
func (*Handler) MeshOpsHandler ¶ added in v0.0.4
func (h *Handler) MeshOpsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
MeshOpsHandler is used to send operations to the adapters
func (*Handler) PrometheusConfigHandler ¶ added in v0.0.6
func (h *Handler) PrometheusConfigHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
PrometheusConfigHandler is used for persisting prometheus configuration
func (*Handler) PrometheusPingHandler ¶ added in v0.3.7
func (h *Handler) PrometheusPingHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
PrometheusPingHandler - fetches server version to simulate ping
func (*Handler) PrometheusQueryHandler ¶ added in v0.0.6
func (h *Handler) PrometheusQueryHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
PrometheusQueryHandler handles prometheus queries
func (*Handler) PrometheusQueryRangeHandler ¶ added in v0.0.6
func (h *Handler) PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
PrometheusQueryRangeHandler handles prometheus range queries
func (*Handler) PrometheusStaticBoardHandler ¶ added in v0.0.6
func (h *Handler) PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
PrometheusStaticBoardHandler returns the static board
func (*Handler) ProviderHandler ¶ added in v0.3.10
func (h *Handler) ProviderHandler(w http.ResponseWriter, r *http.Request)
ProviderHandler - handles the choice of provider
func (*Handler) ProviderMiddleware ¶ added in v0.3.10
ProviderMiddleware is a middleware to validate if a provider is set
func (*Handler) ProviderUIHandler ¶ added in v0.3.10
func (h *Handler) ProviderUIHandler(w http.ResponseWriter, r *http.Request)
ProviderUIHandler - serves providers UI
func (*Handler) ProvidersHandler ¶ added in v0.3.10
func (h *Handler) ProvidersHandler(w http.ResponseWriter, r *http.Request)
ProvidersHandler returns a list of providers
func (*Handler) SaveSelectedGrafanaBoardsHandler ¶ added in v0.0.6
func (h *Handler) SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, p models.Provider)
SaveSelectedGrafanaBoardsHandler is used to persist board and panel selection
func (*Handler) SaveSelectedPrometheusBoardsHandler ¶ added in v0.0.6
func (h *Handler) SaveSelectedPrometheusBoardsHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
SaveSelectedPrometheusBoardsHandler persists selected board and panels
func (*Handler) ScanGrafanaHandler ¶ added in v0.3.13
func (h *Handler) ScanGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
ScanGrafanaHandler - fetches Grafana
func (*Handler) ScanPromGrafanaHandler ¶ added in v0.3.13
func (h *Handler) ScanPromGrafanaHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
ScanPromGrafanaHandler - fetches Promotheus and Grafana
func (*Handler) ScanPromotheusHandler ¶ added in v0.3.13
func (h *Handler) ScanPromotheusHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
ScanPromotheusHandler - fetches Promotheus
func (*Handler) ServerVersionHandler ¶ added in v0.3.18
func (h *Handler) ServerVersionHandler(w http.ResponseWriter, r *http.Request)
ServerVersionHandler handles the version api request for the server
func (*Handler) SessionInjectorMiddleware ¶ added in v0.2.0
func (h *Handler) SessionInjectorMiddleware(next func(http.ResponseWriter, *http.Request, *models.Preference, *models.User, models.Provider)) http.Handler
SessionInjectorMiddleware - is a middleware which injects user and session object
func (*Handler) SessionSyncHandler ¶ added in v0.0.6
func (h *Handler) SessionSyncHandler(w http.ResponseWriter, req *http.Request, prefObj *models.Preference, user *models.User, provider models.Provider)
SessionSyncHandler is used to send session data to the UI for initial sync
func (*Handler) TokenHandler ¶ added in v0.3.15
func (h *Handler) TokenHandler(w http.ResponseWriter, r *http.Request, p models.Provider, fromMiddleWare bool)
TokenHandler Recieves token from the actual provider
func (*Handler) UserHandler ¶ added in v0.0.4
func (h *Handler) UserHandler(w http.ResponseWriter, req *http.Request, _ *models.Preference, user *models.User, provider models.Provider)
UserHandler returns info about the logged in user
Source Files ¶
- common_handlers.go
- events_streamer.go
- fetch_results_handler.go
- grafana_handlers.go
- handler_instance.go
- k8sconfig_handler.go
- load_test_handler.go
- load_test_preferences_handler.go
- mesh_ops_handlers.go
- middlewares.go
- prometheus_handlers.go
- provider_handler.go
- server_spec_handler.go
- session_sync_handler.go
- ui_handler.go
- user_handler.go
- vars.go