namespace

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2018 License: Apache-2.0 Imports: 17 Imported by: 5 modules, 11 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 namespace add handler.
	AddURL = handler.RoutePrefixV1 + "/namespace"

	// AddHTTPMethod is the HTTP method used with this resource.
	AddHTTPMethod = http.MethodPost
)
View Source
const (
	// GetURL is the url for the namespace get handler (with the GET method).
	GetURL = handler.RoutePrefixV1 + "/namespace"

	// GetHTTPMethod is the HTTP method used with this resource.
	GetHTTPMethod = http.MethodGet
)
View Source
const (

	// DeleteHTTPMethod is the HTTP method used with this resource.
	DeleteHTTPMethod = http.MethodDelete
)
View Source
const (
	// M3DBNodeNamespacesKey is the KV key that holds namespaces
	M3DBNodeNamespacesKey = "m3db.node.namespaces"
)

Variables

View Source
var (
	// DeleteURL is the url for the namespace delete handler.
	DeleteURL = fmt.Sprintf("%s/namespace/{%s}", handler.RoutePrefixV1, namespaceIDVar)
)

Functions

func Metadata

func Metadata(store kv.Store) ([]namespace.Metadata, int, error)

Metadata returns the current metadata in the given store and its version

func RegisterRoutes

func RegisterRoutes(r *mux.Router, client clusterclient.Client)

RegisterRoutes registers the namespace routes

Types

type AddHandler

type AddHandler Handler

AddHandler is the handler for namespace adds.

func NewAddHandler

func NewAddHandler(client clusterclient.Client) *AddHandler

NewAddHandler returns a new instance of AddHandler.

func (*AddHandler) Add

Add adds a namespace.

func (*AddHandler) ServeHTTP

func (h *AddHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type DeleteHandler

type DeleteHandler Handler

DeleteHandler is the handler for namespace deletes.

func NewDeleteHandler

func NewDeleteHandler(client clusterclient.Client) *DeleteHandler

NewDeleteHandler returns a new instance of DeleteHandler.

func (*DeleteHandler) Delete

func (h *DeleteHandler) Delete(id string) error

Delete deletes a namespace.

func (*DeleteHandler) ServeHTTP

func (h *DeleteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type GetHandler

type GetHandler Handler

GetHandler is the handler for namespace gets.

func NewGetHandler

func NewGetHandler(client clusterclient.Client) *GetHandler

NewGetHandler returns a new instance of GetHandler.

func (*GetHandler) Get

func (h *GetHandler) Get() (nsproto.Registry, error)

Get gets the namespaces.

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 namespace endpoints.

Jump to

Keyboard shortcuts

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