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 ¶
- func FormatJsonResponse(w http.ResponseWriter, object interface{})
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(routes []Route) *mux.Router
- type Handler
- func (h *Handler) AddDevice(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreateImage(w http.ResponseWriter, r *http.Request)
- func (h *Handler) CreatePool(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetCrushMap(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetImageMapInfo(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetImages(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetMonitors(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetNodes(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetPools(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetRoutes() []Route
- func (h *Handler) GetStatusDetails(w http.ResponseWriter, r *http.Request)
- func (h *Handler) RemoveDevice(w http.ResponseWriter, r *http.Request)
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatJsonResponse ¶
func FormatJsonResponse(w http.ResponseWriter, object interface{})
Format a json response
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) 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