api

package
v0.0.0-...-110085e Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2016 The Rook Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatJsonResponse

func FormatJsonResponse(w http.ResponseWriter, object interface{})

Format a json response

func Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter(routes []Route) *mux.Router

Types

type Handler

type Handler struct {
	ConnectionFactory cephmgr.ConnectionFactory
	CephFactory       ceph.ConnectionFactory
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(context *clusterd.Context, connFactory cephmgr.ConnectionFactory, cephFactory ceph.ConnectionFactory) *Handler

func (*Handler) AddDevice

func (h *Handler) AddDevice(w http.ResponseWriter, r *http.Request)

Adds the device and configures an OSD on the device. POST /device

func (*Handler) CreateImage

func (h *Handler) CreateImage(w http.ResponseWriter, r *http.Request)

Creates a new image in this cluster. POST /image

func (*Handler) CreatePool

func (h *Handler) CreatePool(w http.ResponseWriter, r *http.Request)

Creates a storage pool as specified by the request body. POST /pool

func (*Handler) GetCrushMap

func (h *Handler) GetCrushMap(w http.ResponseWriter, r *http.Request)

Gets the current crush map for the cluster. GET /crushmap

func (*Handler) GetImageMapInfo

func (h *Handler) GetImageMapInfo(w http.ResponseWriter, r *http.Request)

Gets information needed to map an image to a local device GET /image/mapinfo

func (*Handler) GetImages

func (h *Handler) GetImages(w http.ResponseWriter, r *http.Request)

Gets the images that have been created in this cluster. GET /image

func (*Handler) GetMonitors

func (h *Handler) GetMonitors(w http.ResponseWriter, r *http.Request)

Gets the monitors that have been created in this cluster. GET /mon

func (*Handler) GetNodes

func (h *Handler) GetNodes(w http.ResponseWriter, r *http.Request)

Gets the nodes that are part of this cluster. GET /node

func (*Handler) GetPools

func (h *Handler) GetPools(w http.ResponseWriter, r *http.Request)

Gets the storage pools that have been created in this cluster. GET /pool

func (*Handler) GetRoutes

func (h *Handler) GetRoutes() []Route

func (*Handler) GetStatusDetails

func (h *Handler) GetStatusDetails(w http.ResponseWriter, r *http.Request)

Gets the status details of this cluster. GET /status

func (*Handler) RemoveDevice

func (h *Handler) RemoveDevice(w http.ResponseWriter, r *http.Request)

Stops the OSD and removes a device from participating in the cluster. POST /device/remove

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

Jump to

Keyboard shortcuts

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