topic

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 19 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// AddURL is the url for the topic add handler (with the POST method).
	AddURL = route.Prefix + "/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 = route.Prefix + "/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 = route.Prefix + "/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 = route.Prefix + "/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 = route.Prefix + "/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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL