api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: Apache-2.0 Imports: 16 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.

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 mon.ConnectionFactory
	CephFactory       ceph.ConnectionFactory
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(context *clusterd.Context, connFactory mon.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) CreateFileSystem added in v0.1.1

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

Creates a new file system in this cluster. POST /filesystem

func (*Handler) CreateImage

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

Creates a new image in this cluster. POST /image

func (*Handler) CreateObjectStore added in v0.1.1

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

Creates a new object store in this cluster. POST /object

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) GetClientAccessInfo added in v0.1.1

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

Gets the information needed for a client to access the cluster. GET /client

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) GetFileSystems added in v0.1.1

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

Gets a listing of file systems in this cluster. GET /filesystem

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

func (*Handler) RemoveFileSystem added in v0.1.1

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

Removes an existing filesystem from this cluster. POST /filesystem/remove

func (*Handler) RemoveObjectStore added in v0.1.1

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

Removes the object store from this cluster. POST /object/remove

func (*Handler) SetLogLevel added in v0.1.1

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

Sets the log level for this node. POST /log

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