Documentation ¶
Index ¶
- func NewHandlerInstance(handlerConfig *models.HandlerConfig) models.HandlerInterface
- type Handler
- func (h *Handler) AdapterPingHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) AnonymousStatsHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- 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, _ *sessions.Session, ...)
- func (h *Handler) FetchResultsHandler(w http.ResponseWriter, req *http.Request, session *sessions.Session, ...)
- func (h *Handler) GetAllAdaptersHandler(w http.ResponseWriter, req *http.Request)
- func (h *Handler) GetContextsFromK8SConfig(w http.ResponseWriter, req *http.Request)
- func (h *Handler) GetProviderType() models.ProviderType
- func (h *Handler) GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) GrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, session *sessions.Session, ...)
- func (h *Handler) GrafanaConfigHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) GrafanaPingHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) GrafanaQueryHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) GrafanaQueryRangeHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) InstalledMeshesHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) K8SConfigHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) KubernetesPingHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) LoadTestHandler(w http.ResponseWriter, req *http.Request, session *sessions.Session, ...)
- func (h *Handler) LoadTestPrefencesHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) LoginHandler(w http.ResponseWriter, r *http.Request, fromMiddleWare bool)
- func (h *Handler) LogoutHandler(w http.ResponseWriter, req *http.Request)
- func (h *Handler) MeshAdapterConfigHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) MeshOpsHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) PrometheusConfigHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) PrometheusPingHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) PrometheusQueryHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) SaveSelectedPrometheusBoardsHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) SessionInjectorMiddleware(...) http.Handler
- func (h *Handler) SessionSyncHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
- func (h *Handler) UserHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, ...)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, session *sessions.Session, _ *models.Preference, user *models.User)
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)
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) GetProviderType ¶ added in v0.3.5
func (h *Handler) GetProviderType() models.ProviderType
GetProviderType - retrieves the provider type
func (*Handler) GrafanaBoardImportForPrometheusHandler ¶ added in v0.0.6
func (h *Handler) GrafanaBoardImportForPrometheusHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, session *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, session *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
LoadTestPrefencesHandler is used for persisting load test preferences
func (*Handler) LoginHandler ¶ added in v0.0.4
LoginHandler redirects user for auth or issues session
func (*Handler) LogoutHandler ¶ added in v0.0.4
func (h *Handler) LogoutHandler(w http.ResponseWriter, req *http.Request)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
PrometheusQueryHandler handles prometheus queries
func (*Handler) PrometheusQueryRangeHandler ¶ added in v0.0.6
func (h *Handler) PrometheusQueryRangeHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, prefObj *models.Preference, user *models.User)
PrometheusQueryRangeHandler handles prometheus range queries
func (*Handler) PrometheusStaticBoardHandler ¶ added in v0.0.6
func (h *Handler) PrometheusStaticBoardHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, prefObj *models.Preference, user *models.User)
PrometheusStaticBoardHandler returns the static board
func (*Handler) SaveSelectedGrafanaBoardsHandler ¶ added in v0.0.6
func (h *Handler) SaveSelectedGrafanaBoardsHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, prefObj *models.Preference, user *models.User)
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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
SaveSelectedPrometheusBoardsHandler persists selected board and panels
func (*Handler) SessionInjectorMiddleware ¶ added in v0.2.0
func (h *Handler) SessionInjectorMiddleware(next func(http.ResponseWriter, *http.Request, *sessions.Session, *models.Preference, *models.User)) 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, _ *sessions.Session, prefObj *models.Preference, user *models.User)
SessionSyncHandler is used to send session data to the UI for initial sync
func (*Handler) UserHandler ¶ added in v0.0.4
func (h *Handler) UserHandler(w http.ResponseWriter, req *http.Request, _ *sessions.Session, _ *models.Preference, user *models.User)
UserHandler returns info about the logged in user