Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertInstancesProto(instancesProto []*placementpb.Instance) ([]placement.Instance, error)
- func NewAddHandler(client clusterclient.Client, cfg config.Configuration) http.Handler
- func NewDeleteAllHandler(client clusterclient.Client, cfg config.Configuration) http.Handler
- func NewDeleteHandler(client clusterclient.Client, cfg config.Configuration) http.Handler
- func NewGetHandler(client clusterclient.Client, cfg config.Configuration) http.Handler
- func NewInitHandler(client clusterclient.Client, cfg config.Configuration) http.Handler
- func RegisterRoutes(r *mux.Router, client clusterclient.Client, cfg config.Configuration)
- func Service(clusterClient clusterclient.Client, cfg config.Configuration) (placement.Service, error)
- type Handler
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 ¶
Click to show internal directories.
Click to hide internal directories.