Documentation ¶
Index ¶
- type Config
- type IngestHandler
- type QueryMeterResponse
- type Router
- func (a *Router) CreateMeter(w http.ResponseWriter, r *http.Request, params api.CreateMeterParams)
- func (a *Router) CreateNamespace(w http.ResponseWriter, r *http.Request)
- func (a *Router) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, ...)
- func (a *Router) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, ...)
- func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request, params api.IngestEventsParams)
- func (a *Router) ListEvents(w http.ResponseWriter, r *http.Request, params api.ListEventsParams)
- func (a *Router) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, ...)
- func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)
- func (a *Router) QueryMeter(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { NamespaceManager *namespace.Manager StreamingConnector streaming.Connector IngestHandler IngestHandler Meters meter.Repository }
type IngestHandler ¶
type IngestHandler interface {
ServeHTTP(w http.ResponseWriter, r *http.Request, params api.IngestEventsParams)
}
type QueryMeterResponse ¶
type QueryMeterResponse struct { WindowSize *models.WindowSize `json:"windowSize,omitempty"` From *time.Time `json:"from,omitempty"` To *time.Time `json:"to,omitempty"` Data []models.MeterQueryRow `json:"data"` }
QueryMeterResponse is returned by the QueryMeter endpoint.
func (QueryMeterResponse) Render ¶
func (resp QueryMeterResponse) Render(_ http.ResponseWriter, _ *http.Request) error
Render implements the chi renderer interface.
func (QueryMeterResponse) RenderCSV ¶
func (resp QueryMeterResponse) RenderCSV(w http.ResponseWriter, r *http.Request, groupByKeys []string, meterIDOrSlug string)
RenderCSV renders the response as CSV.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) CreateMeter ¶
func (a *Router) CreateMeter(w http.ResponseWriter, r *http.Request, params api.CreateMeterParams)
func (*Router) CreateNamespace ¶
func (a *Router) CreateNamespace(w http.ResponseWriter, r *http.Request)
CreateNamespace handles the HTTP request for creating a new namespace.
func (*Router) DeleteMeter ¶
func (a *Router) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, params api.DeleteMeterParams)
func (*Router) GetMeter ¶
func (a *Router) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, params api.GetMeterParams)
func (*Router) IngestEvents ¶
func (a *Router) IngestEvents(w http.ResponseWriter, r *http.Request, params api.IngestEventsParams)
func (*Router) ListEvents ¶
func (a *Router) ListEvents(w http.ResponseWriter, r *http.Request, params api.ListEventsParams)
func (*Router) ListMeterSubjects ¶
func (a *Router) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, params api.ListMeterSubjectsParams)
ListMeterSubjects lists the subjects of a meter.
func (*Router) ListMeters ¶
func (a *Router) ListMeters(w http.ResponseWriter, r *http.Request, params api.ListMetersParams)
func (*Router) QueryMeter ¶
func (a *Router) QueryMeter(w http.ResponseWriter, r *http.Request, meterIDOrSlug string, params api.QueryMeterParams)
QueryMeter queries the values stored for a meter.
Click to show internal directories.
Click to hide internal directories.