Documentation ¶
Index ¶
- Constants
- Variables
- type App
- func (a *App) Close()
- func (a *App) ClusterCreate(w http.ResponseWriter, r *http.Request)
- func (a *App) ClusterDelete(w http.ResponseWriter, r *http.Request)
- func (a *App) ClusterInfo(w http.ResponseWriter, r *http.Request)
- func (a *App) ClusterList(w http.ResponseWriter, r *http.Request)
- func (a *App) Hello(w http.ResponseWriter, r *http.Request)
- func (a *App) NotImplemented(w http.ResponseWriter, r *http.Request)
- func (a *App) SetRoutes(router *mux.Router) error
- type ClusterEntry
- func (c *ClusterEntry) Marshal() ([]byte, error)
- func (c *ClusterEntry) NodeAdd(id string)
- func (c *ClusterEntry) NodeDelete(id string)
- func (c *ClusterEntry) StorageAdd(amount uint64)
- func (c *ClusterEntry) StorageAllocate(amount uint64)
- func (c *ClusterEntry) StorageFree(amount uint64)
- func (c *ClusterEntry) Unmarshal(buffer []byte) error
- func (c *ClusterEntry) VolumeAdd(id string)
- func (c *ClusterEntry) VolumeDelete(id string)
- type ClusterInfoResponse
- type ClusterListResponse
- type StorageSize
Constants ¶
View Source
const ( ASYNC_ROUTE = "/queue" BOLTDB_BUCKET_CLUSTER = "CLUSTER" BOLTDB_BUCKET_NODE = "NODE" BOLTDB_BUCKET_VOLUME = "VOLUME" BOLTDB_BUCKET_DEVICE = "DEVICE" BOLTDB_BUCKET_BRICK = "BRICK" )
Variables ¶
View Source
var (
ErrNotFound = errors.New("Id not found")
)
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) ClusterCreate ¶
func (a *App) ClusterCreate(w http.ResponseWriter, r *http.Request)
func (*App) ClusterDelete ¶
func (a *App) ClusterDelete(w http.ResponseWriter, r *http.Request)
func (*App) ClusterInfo ¶
func (a *App) ClusterInfo(w http.ResponseWriter, r *http.Request)
func (*App) ClusterList ¶
func (a *App) ClusterList(w http.ResponseWriter, r *http.Request)
func (*App) NotImplemented ¶
func (a *App) NotImplemented(w http.ResponseWriter, r *http.Request)
type ClusterEntry ¶
type ClusterEntry struct {
Info ClusterInfoResponse
}
func NewClusterEntry ¶
func NewClusterEntry() *ClusterEntry
func (*ClusterEntry) Marshal ¶
func (c *ClusterEntry) Marshal() ([]byte, error)
func (*ClusterEntry) NodeAdd ¶
func (c *ClusterEntry) NodeAdd(id string)
func (*ClusterEntry) NodeDelete ¶
func (c *ClusterEntry) NodeDelete(id string)
func (*ClusterEntry) StorageAdd ¶
func (c *ClusterEntry) StorageAdd(amount uint64)
func (*ClusterEntry) StorageAllocate ¶
func (c *ClusterEntry) StorageAllocate(amount uint64)
func (*ClusterEntry) StorageFree ¶
func (c *ClusterEntry) StorageFree(amount uint64)
func (*ClusterEntry) Unmarshal ¶
func (c *ClusterEntry) Unmarshal(buffer []byte) error
func (*ClusterEntry) VolumeAdd ¶
func (c *ClusterEntry) VolumeAdd(id string)
func (*ClusterEntry) VolumeDelete ¶
func (c *ClusterEntry) VolumeDelete(id string)
type ClusterInfoResponse ¶
type ClusterInfoResponse struct { Id string `json:"id"` Nodes sort.StringSlice `json:"nodes"` Volumes sort.StringSlice `json:"volumes"` Storage StorageSize `json:"storage"` }
type ClusterListResponse ¶
type ClusterListResponse struct {
Clusters []string `json:"clusters"`
}
type StorageSize ¶
type StorageSize struct { Total uint64 `json:"total"` Free uint64 `json:"free"` Used uint64 `json:"used"` }
Storage values in KB
Click to show internal directories.
Click to hide internal directories.