Documentation ¶
Index ¶
- Constants
- func RegisterRoutes(r *queryhttp.EndpointRegistry, client clusterclient.Client, ...) error
- func Service(clusterClient clusterclient.Client, opts handleroptions.ServiceOptions) (topic.Service, error)
- type AddHandler
- type DeleteHandler
- type GetHandler
- type Handler
- type InitHandler
- type UpdateHandler
Constants ¶
View Source
const ( // AddURL is the url for the topic add handler (with the POST method). AddURL = handler.RoutePrefixV1 + "/topic" // AddHTTPMethod is the HTTP method used with this resource. AddHTTPMethod = http.MethodPost )
View Source
const ( // DefaultTopicName is the default topic name DefaultTopicName = "aggregated_metrics" // HeaderTopicName is the header used to specify the topic name. HeaderTopicName = "topic-name" )
View Source
const ( // DeleteURL is the url for the topic delete handler (with the DELETE method). DeleteURL = handler.RoutePrefixV1 + "/topic" // DeleteHTTPMethod is the HTTP method used with this resource. DeleteHTTPMethod = http.MethodDelete )
View Source
const ( // GetURL is the url for the topic get handler (with the GET method). GetURL = handler.RoutePrefixV1 + "/topic" // GetHTTPMethod is the HTTP method used with this resource. GetHTTPMethod = http.MethodGet )
View Source
const ( // InitURL is the url for the topic init handler (with the POST method). InitURL = handler.RoutePrefixV1 + "/topic/init" // InitHTTPMethod is the HTTP method used with this resource. InitHTTPMethod = http.MethodPost )
View Source
const ( // UpdateURL is the url for the topic update handler (with the PUT method). UpdateURL = handler.RoutePrefixV1 + "/topic" // UpdateHTTPMethod is the HTTP method used with this resource. UpdateHTTPMethod = http.MethodPut )
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutes ¶
func RegisterRoutes( r *queryhttp.EndpointRegistry, client clusterclient.Client, cfg config.Configuration, instrumentOpts instrument.Options, ) error
RegisterRoutes registers the topic routes
func Service ¶
func Service(clusterClient clusterclient.Client, opts handleroptions.ServiceOptions) (topic.Service, error)
Service gets a topic service from m3cluster client
Types ¶
type AddHandler ¶
type AddHandler Handler
AddHandler is the handler for topic adds.
func (*AddHandler) ServeHTTP ¶
func (h *AddHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DeleteHandler ¶ added in v0.12.0
type DeleteHandler Handler
DeleteHandler is the handler for topic adds.
func (*DeleteHandler) ServeHTTP ¶ added in v0.12.0
func (h *DeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetHandler ¶
type GetHandler Handler
GetHandler is the handler for topic gets.
func (*GetHandler) ServeHTTP ¶
func (h *GetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler represents a generic handler for topic endpoints. nolint: structcheck
type InitHandler ¶
type InitHandler Handler
InitHandler is the handler for topic inits.
func (*InitHandler) ServeHTTP ¶
func (h *InitHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UpdateHandler ¶ added in v0.15.0
type UpdateHandler Handler
UpdateHandler is the handler for topic updates.
func (*UpdateHandler) ServeHTTP ¶ added in v0.15.0
func (h *UpdateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.