Documentation ¶
Index ¶
- Constants
- Variables
- type Brick
- type BrickNode
- type BrickNodes
- type GlusterFSDB
- func (g *GlusterFSDB) Close()
- func (g *GlusterFSDB) Commit() error
- func (g *GlusterFSDB) Load() error
- func (g *GlusterFSDB) Node(id string) *NodeEntry
- func (g *GlusterFSDB) Reader(closure func() error) error
- func (g *GlusterFSDB) Volume(id string) *VolumeEntry
- func (g *GlusterFSDB) Writer(closure func() error) error
- type GlusterFSDbOnDisk
- type GlusterFSPlugin
- func (g *GlusterFSPlugin) Close()
- func (m *GlusterFSPlugin) NodeAdd(v *requests.NodeAddRequest) (*requests.NodeInfoResp, error)
- func (m *GlusterFSPlugin) NodeAddDevice(id string, req *requests.DeviceAddRequest) error
- func (m *GlusterFSPlugin) NodeInfo(id string) (*requests.NodeInfoResp, error)
- func (m *GlusterFSPlugin) NodeList() (*requests.NodeListResponse, error)
- func (m *GlusterFSPlugin) NodeRemove(id string) error
- func (m *GlusterFSPlugin) VolumeCreate(v *requests.VolumeCreateRequest) (*requests.VolumeInfoResp, error)
- func (m *GlusterFSPlugin) VolumeDelete(id string) error
- func (m *GlusterFSPlugin) VolumeInfo(id string) (*requests.VolumeInfoResp, error)
- func (m *GlusterFSPlugin) VolumeList() (*requests.VolumeListResponse, error)
- func (m *GlusterFSPlugin) VolumeResize(id string) (*requests.VolumeInfoResp, error)
- type GlusterRing
- type NodeEntry
- type RingOutput
- type VolumeEntry
- type VolumeStateResponse
Constants ¶
View Source
const ( KB = 1 MB = KB * 1024 GB = MB * 1024 TB = GB * 1024 )
View Source
const ( VGDISPLAY_SIZE_KB = 11 VGDISPLAY_PHYSICAL_EXTENT_SIZE = 12 VGDISPLAY_TOTAL_NUMBER_EXTENTS = 13 VGDISPLAY_ALLOCATED_NUMBER_EXTENTS = 14 VGDISPLAY_FREE_NUMBER_EXTENTS = 15 )
View Source
const ( // :TODO: This should be saved on the brick object so that on upgrades // or changes it still has the correct older value THINP_SNAPSHOT_FACTOR = 1.25 )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Brick ¶
type Brick struct { Id string `json:"id"` Path string `json:"path"` NodeId string `json:"node_id"` DeviceId string `json:"device_id"` Size uint64 `json:"size"` // contains filtered or unexported fields }
func NewBrick ¶
func NewBrick(size uint64, db *GlusterFSDB) *Brick
func (*Brick) AllocateStorage ¶
func (*Brick) FreeStorage ¶
func (*Brick) Load ¶
func (b *Brick) Load(db *GlusterFSDB)
type BrickNodes ¶
type BrickNodes []BrickNode
type GlusterFSDB ¶
type GlusterFSDB struct {
// contains filtered or unexported fields
}
func NewGlusterFSDB ¶
func NewGlusterFSDB(dbfile string) *GlusterFSDB
func (*GlusterFSDB) Close ¶
func (g *GlusterFSDB) Close()
func (*GlusterFSDB) Commit ¶
func (g *GlusterFSDB) Commit() error
func (*GlusterFSDB) Load ¶
func (g *GlusterFSDB) Load() error
func (*GlusterFSDB) Node ¶
func (g *GlusterFSDB) Node(id string) *NodeEntry
func (*GlusterFSDB) Reader ¶
func (g *GlusterFSDB) Reader(closure func() error) error
func (*GlusterFSDB) Volume ¶
func (g *GlusterFSDB) Volume(id string) *VolumeEntry
func (*GlusterFSDB) Writer ¶
func (g *GlusterFSDB) Writer(closure func() error) error
type GlusterFSDbOnDisk ¶
type GlusterFSDbOnDisk struct { Nodes map[string]*NodeEntry Volumes map[string]*VolumeEntry }
type GlusterFSPlugin ¶
type GlusterFSPlugin struct {
// contains filtered or unexported fields
}
func NewGlusterFSPlugin ¶
func NewGlusterFSPlugin() *GlusterFSPlugin
func (*GlusterFSPlugin) Close ¶
func (g *GlusterFSPlugin) Close()
func (*GlusterFSPlugin) NodeAdd ¶
func (m *GlusterFSPlugin) NodeAdd(v *requests.NodeAddRequest) (*requests.NodeInfoResp, error)
func (*GlusterFSPlugin) NodeAddDevice ¶
func (m *GlusterFSPlugin) NodeAddDevice(id string, req *requests.DeviceAddRequest) error
func (*GlusterFSPlugin) NodeInfo ¶
func (m *GlusterFSPlugin) NodeInfo(id string) (*requests.NodeInfoResp, error)
func (*GlusterFSPlugin) NodeList ¶
func (m *GlusterFSPlugin) NodeList() (*requests.NodeListResponse, error)
func (*GlusterFSPlugin) NodeRemove ¶
func (m *GlusterFSPlugin) NodeRemove(id string) error
func (*GlusterFSPlugin) VolumeCreate ¶
func (m *GlusterFSPlugin) VolumeCreate(v *requests.VolumeCreateRequest) (*requests.VolumeInfoResp, error)
func (*GlusterFSPlugin) VolumeDelete ¶
func (m *GlusterFSPlugin) VolumeDelete(id string) error
func (*GlusterFSPlugin) VolumeInfo ¶
func (m *GlusterFSPlugin) VolumeInfo(id string) (*requests.VolumeInfoResp, error)
func (*GlusterFSPlugin) VolumeList ¶
func (m *GlusterFSPlugin) VolumeList() (*requests.VolumeListResponse, error)
func (*GlusterFSPlugin) VolumeResize ¶
func (m *GlusterFSPlugin) VolumeResize(id string) (*requests.VolumeInfoResp, error)
type GlusterRing ¶
type GlusterRing struct {
// contains filtered or unexported fields
}
func NewGlusterRing ¶
func NewGlusterRing(db *GlusterFSDB) *GlusterRing
func (*GlusterRing) CreateRing ¶
func (g *GlusterRing) CreateRing()
func (*GlusterRing) GetNodes ¶
func (g *GlusterRing) GetNodes(brick_num int, id string) (BrickNodes, error)
type NodeEntry ¶
type NodeEntry struct { Info requests.NodeInfoResp // contains filtered or unexported fields }
func NewNodeEntry ¶
func NewNodeEntry(v *requests.NodeAddRequest, db *GlusterFSDB) *NodeEntry
func (*NodeEntry) Load ¶
func (n *NodeEntry) Load(db *GlusterFSDB)
type RingOutput ¶
type RingOutput struct { Nodes BrickNodes `json:"nodes"` Partition int `json:"partition"` }
type VolumeEntry ¶
type VolumeEntry struct { Info requests.VolumeInfoResp State VolumeStateResponse // contains filtered or unexported fields }
func NewVolumeEntry ¶
func NewVolumeEntry(v *requests.VolumeCreateRequest, bricks []*Brick, replica int, db *GlusterFSDB) *VolumeEntry
func (*VolumeEntry) Copy ¶
func (v *VolumeEntry) Copy() *VolumeEntry
func (*VolumeEntry) CreateGlusterVolume ¶
func (v *VolumeEntry) CreateGlusterVolume() error
func (*VolumeEntry) Destroy ¶
func (v *VolumeEntry) Destroy() error
func (*VolumeEntry) Load ¶
func (v *VolumeEntry) Load(db *GlusterFSDB)
Click to show internal directories.
Click to hide internal directories.