placement

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 0 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 (
	// DefaultServiceName is the default service ID name
	DefaultServiceName = "m3db"

	// DefaultServiceEnvironment is the default service ID environment
	DefaultServiceEnvironment = "default_env"

	// DefaultServiceZone is the default service ID zone
	DefaultServiceZone = "embedded"
)
View Source
const (
	// AddURL is the url for the placement add handler (with the POST method).
	AddURL = "/placement/add"
)
View Source
const (
	// DeleteAllURL is the url for the handler to delete all placements (with the DELETE method).
	DeleteAllURL = "/placement"
)
View Source
const (
	// GetURL is the url for the placement get handler (with the GET method).
	GetURL = "/placement"
)
View Source
const (
	// InitURL is the url for the placement init handler (with the POST method).
	InitURL = "/placement/init"
)

Variables

View Source
var (
	// DeleteURL is the url for the placement delete handler (with the DELETE method).
	DeleteURL = fmt.Sprintf("/placement/{%s}", placementIDVar)
)

Functions

func ConvertInstancesProto

func ConvertInstancesProto(instancesProto []*placementpb.Instance) ([]placement.Instance, error)

ConvertInstancesProto converts a slice of protobuf `Instance`s to `placement.Instance`s

func NewAddHandler

func NewAddHandler(client clusterclient.Client, cfg config.Configuration) http.Handler

NewAddHandler returns a new instance of a placement add handler.

func NewDeleteAllHandler

func NewDeleteAllHandler(client clusterclient.Client, cfg config.Configuration) http.Handler

NewDeleteAllHandler returns a new instance of a placement delete all handler.

func NewDeleteHandler

func NewDeleteHandler(client clusterclient.Client, cfg config.Configuration) http.Handler

NewDeleteHandler returns a new instance of a placement delete handler.

func NewGetHandler

func NewGetHandler(client clusterclient.Client, cfg config.Configuration) http.Handler

NewGetHandler returns a new instance of a placement get handler.

func NewInitHandler

func NewInitHandler(client clusterclient.Client, cfg config.Configuration) http.Handler

NewInitHandler returns a new instance of a placement init handler.

func RegisterRoutes

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

RegisterRoutes registers the placement routes

func Service

func Service(clusterClient clusterclient.Client, cfg config.Configuration) (placement.Service, error)

Service gets a placement service from m3cluster client

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler represents a generic handler for placement endpoints.

Jump to

Keyboard shortcuts

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