glusterfs

package
v0.0.0-...-a4c6052 Latest Latest
Warning

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

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

Documentation

Index

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 NewApp

func NewApp() *App

func (*App) Close

func (a *App) Close()

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) Hello

func (a *App) Hello(w http.ResponseWriter, r *http.Request)

func (*App) NotImplemented

func (a *App) NotImplemented(w http.ResponseWriter, r *http.Request)

func (*App) SetRoutes

func (a *App) SetRoutes(router *mux.Router) error

Register Routes

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

Jump to

Keyboard shortcuts

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