database

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: Apache-2.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// CreateURL is the URL for the database create handler.
	CreateURL = handler.RoutePrefixV1 + "/database/create"

	// CreateNamespaceURL is the URL for the database namespace create handler.
	CreateNamespaceURL = handler.RoutePrefixV1 + "/database/namespace/create"

	// CreateHTTPMethod is the HTTP method used with the create database resource.
	CreateHTTPMethod = http.MethodPost

	// CreateNamespaceHTTPMethod is the HTTP method used with the create database namespace resource.
	CreateNamespaceHTTPMethod = http.MethodPost

	// DefaultLocalHostID is the default local host ID when creating a database.
	DefaultLocalHostID = "m3db_local"

	// DefaultLocalIsolationGroup is the default isolation group when creating a
	// local database.
	DefaultLocalIsolationGroup = "local"

	// DefaultLocalZone is the default zone when creating a local database.
	DefaultLocalZone = "embedded"
)

Variables

This section is empty.

Functions

func NewCreateHandler

func NewCreateHandler(
	client clusterclient.Client,
	cfg config.Configuration,
	embeddedDbCfg *dbconfig.DBConfiguration,
	defaults []handleroptions.ServiceOptionsDefault,
	instrumentOpts instrument.Options,
	namespaceValidator options.NamespaceValidator,
) (http.Handler, error)

NewCreateHandler returns a new instance of a database create handler.

func RegisterRoutes

func RegisterRoutes(
	r *queryhttp.EndpointRegistry,
	client clusterclient.Client,
	cfg config.Configuration,
	embeddedDbCfg *dbconfig.DBConfiguration,
	defaults []handleroptions.ServiceOptionsDefault,
	instrumentOpts instrument.Options,
	namespaceValidator options.NamespaceValidator,
) error

RegisterRoutes registers the namespace routes

Types

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