Documentation ¶
Index ¶
- Constants
- Variables
- func BrickList(tx *bolt.Tx) ([]string, error)
- func ClusterList(tx *bolt.Tx) ([]string, error)
- func CreateBricks(db *bolt.DB, executor executors.Executor, brick_entries []*BrickEntry) error
- func DestroyBricks(db *bolt.DB, executor executors.Executor, brick_entries []*BrickEntry) error
- func DeviceList(tx *bolt.Tx) ([]string, error)
- func EntryDelete(tx *bolt.Tx, entry DbEntry, key string) error
- func EntryKeys(tx *bolt.Tx, bucket string) []string
- func EntryLoad(tx *bolt.Tx, entry DbEntry, key string) error
- func EntryRegister(tx *bolt.Tx, entry DbEntry, key string, value []byte) ([]byte, error)
- func EntrySave(tx *bolt.Tx, entry DbEntry, key string) error
- func VolumeList(tx *bolt.Tx) ([]string, error)
- type Allocator
- type App
- func (a *App) Auth(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
- func (a *App) Backup(w http.ResponseWriter, r *http.Request)
- 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) DeviceAdd(w http.ResponseWriter, r *http.Request)
- func (a *App) DeviceDelete(w http.ResponseWriter, r *http.Request)
- func (a *App) DeviceInfo(w http.ResponseWriter, r *http.Request)
- func (a *App) DeviceSetState(w http.ResponseWriter, r *http.Request)
- func (a *App) NodeAdd(w http.ResponseWriter, r *http.Request)
- func (a *App) NodeDelete(w http.ResponseWriter, r *http.Request)
- func (a *App) NodeInfo(w http.ResponseWriter, r *http.Request)
- func (a *App) NodeSetState(w http.ResponseWriter, r *http.Request)
- func (a *App) NotFoundHandler(w http.ResponseWriter, r *http.Request)
- func (a *App) SetRoutes(router *mux.Router) error
- func (a *App) VolumeCreate(w http.ResponseWriter, r *http.Request)
- func (a *App) VolumeDelete(w http.ResponseWriter, r *http.Request)
- func (a *App) VolumeExpand(w http.ResponseWriter, r *http.Request)
- func (a *App) VolumeInfo(w http.ResponseWriter, r *http.Request)
- func (a *App) VolumeList(w http.ResponseWriter, r *http.Request)
- type BrickEntry
- func (b *BrickEntry) BucketName() string
- func (b *BrickEntry) Create(db *bolt.DB, executor executors.Executor) error
- func (b *BrickEntry) Delete(tx *bolt.Tx) error
- func (b *BrickEntry) Destroy(db *bolt.DB, executor executors.Executor) error
- func (b *BrickEntry) DestroyCheck(db *bolt.DB, executor executors.Executor) error
- func (b *BrickEntry) Id() string
- func (b *BrickEntry) Marshal() ([]byte, error)
- func (b *BrickEntry) NewInfoResponse(tx *bolt.Tx) (*api.BrickInfo, error)
- func (b *BrickEntry) Save(tx *bolt.Tx) error
- func (b *BrickEntry) SetId(id string)
- func (b *BrickEntry) TotalSize() uint64
- func (b *BrickEntry) Unmarshal(buffer []byte) error
- type ClusterEntry
- func (c *ClusterEntry) BucketName() string
- func (c *ClusterEntry) ConflictString() string
- func (c *ClusterEntry) Delete(tx *bolt.Tx) error
- func (c *ClusterEntry) Marshal() ([]byte, error)
- func (c *ClusterEntry) NewClusterInfoResponse(tx *bolt.Tx) (*api.ClusterInfoResponse, error)
- func (c *ClusterEntry) NodeAdd(id string)
- func (c *ClusterEntry) NodeDelete(id string)
- func (c *ClusterEntry) NodeEntryFromClusterIndex(tx *bolt.Tx, index int) (*NodeEntry, error)
- func (c *ClusterEntry) Save(tx *bolt.Tx) error
- func (c *ClusterEntry) Unmarshal(buffer []byte) error
- func (c *ClusterEntry) VolumeAdd(id string)
- func (c *ClusterEntry) VolumeDelete(id string)
- type ConfigFile
- type CreateType
- type DbEntry
- type DeviceEntry
- func (d *DeviceEntry) BrickAdd(id string)
- func (d *DeviceEntry) BrickDelete(id string)
- func (d *DeviceEntry) BucketName() string
- func (d *DeviceEntry) ConflictString() string
- func (d *DeviceEntry) Delete(tx *bolt.Tx) error
- func (d *DeviceEntry) Deregister(tx *bolt.Tx) error
- func (d *DeviceEntry) Id() string
- func (d *DeviceEntry) IsDeleteOk() bool
- func (d *DeviceEntry) Marshal() ([]byte, error)
- func (d *DeviceEntry) NewBrickEntry(amount uint64, snapFactor float64, gid int64) *BrickEntry
- func (d *DeviceEntry) NewInfoResponse(tx *bolt.Tx) (*api.DeviceInfoResponse, error)
- func (d *DeviceEntry) Register(tx *bolt.Tx) error
- func (d *DeviceEntry) Save(tx *bolt.Tx) error
- func (d *DeviceEntry) SetExtentSize(amount uint64)
- func (d *DeviceEntry) SetId(id string)
- func (d *DeviceEntry) SetState(tx *bolt.Tx, a Allocator, s api.EntryState) error
- func (d *DeviceEntry) StorageAllocate(amount uint64)
- func (d *DeviceEntry) StorageCheck(amount uint64) bool
- func (d *DeviceEntry) StorageFree(amount uint64)
- func (d *DeviceEntry) StorageSet(amount uint64)
- func (d *DeviceEntry) Unmarshal(buffer []byte) error
- type Entry
- type GlusterFSConfig
- type MockAllocator
- func (d *MockAllocator) AddDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
- func (d *MockAllocator) GetNodes(clusterId, brickId string) (<-chan string, chan<- struct{}, <-chan error)
- func (d *MockAllocator) RemoveCluster(clusterId string) error
- func (d *MockAllocator) RemoveDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
- type NodeEntry
- func (n *NodeEntry) BucketName() string
- func (n *NodeEntry) ConflictString() string
- func (n *NodeEntry) Delete(tx *bolt.Tx) error
- func (n *NodeEntry) Deregister(tx *bolt.Tx) error
- func (n *NodeEntry) DeviceAdd(id string)
- func (n *NodeEntry) DeviceDelete(id string)
- func (n *NodeEntry) IsDeleteOk() bool
- func (n *NodeEntry) ManageHostName() string
- func (n *NodeEntry) Marshal() ([]byte, error)
- func (n *NodeEntry) NewInfoReponse(tx *bolt.Tx) (*api.NodeInfoResponse, error)
- func (n *NodeEntry) Register(tx *bolt.Tx) error
- func (n *NodeEntry) Save(tx *bolt.Tx) error
- func (n *NodeEntry) SetState(tx *bolt.Tx, a Allocator, s api.EntryState) error
- func (n *NodeEntry) StorageHostName() string
- func (n *NodeEntry) Unmarshal(buffer []byte) error
- type NoneDurability
- type SimpleAllocator
- func (s *SimpleAllocator) AddDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
- func (s *SimpleAllocator) GetNodes(clusterId, brickId string) (<-chan string, chan<- struct{}, <-chan error)
- func (s *SimpleAllocator) RemoveCluster(clusterId string) error
- func (s *SimpleAllocator) RemoveDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
- type SimpleAllocatorRing
- type SimpleDevice
- type SimpleDevices
- type SimpleNode
- type SimpleZone
- type VolumeDisperseDurability
- func (d *VolumeDisperseDurability) BrickSizeGenerator(size uint64) func() (int, uint64, error)
- func (d *VolumeDisperseDurability) BricksInSet() int
- func (d *VolumeDisperseDurability) MinVolumeSize() uint64
- func (d *VolumeDisperseDurability) SetDurability()
- func (d *VolumeDisperseDurability) SetExecutorVolumeRequest(v *executors.VolumeRequest)
- type VolumeDurability
- type VolumeEntry
- func (v *VolumeEntry) BrickAdd(id string)
- func (v *VolumeEntry) BrickDelete(id string)
- func (v *VolumeEntry) BricksIds() sort.StringSlice
- func (v *VolumeEntry) BucketName() string
- func (v *VolumeEntry) Create(db *bolt.DB, executor executors.Executor, allocator Allocator) (e error)
- func (v *VolumeEntry) Delete(tx *bolt.Tx) error
- func (v *VolumeEntry) Destroy(db *bolt.DB, executor executors.Executor) error
- func (v *VolumeEntry) Expand(db *bolt.DB, executor executors.Executor, allocator Allocator, sizeGB int) (e error)
- func (v *VolumeEntry) Marshal() ([]byte, error)
- func (v *VolumeEntry) NewInfoResponse(tx *bolt.Tx) (*api.VolumeInfoResponse, error)
- func (v *VolumeEntry) Save(tx *bolt.Tx) error
- func (v *VolumeEntry) Unmarshal(buffer []byte) error
- type VolumeReplicaDurability
- func (r *VolumeReplicaDurability) BrickSizeGenerator(size uint64) func() (int, uint64, error)
- func (r *VolumeReplicaDurability) BricksInSet() int
- func (r *VolumeReplicaDurability) MinVolumeSize() uint64
- func (r *VolumeReplicaDurability) SetDurability()
- func (r *VolumeReplicaDurability) SetExecutorVolumeRequest(v *executors.VolumeRequest)
Constants ¶
const ( ASYNC_ROUTE = "/queue" BOLTDB_BUCKET_CLUSTER = "CLUSTER" BOLTDB_BUCKET_NODE = "NODE" BOLTDB_BUCKET_VOLUME = "VOLUME" BOLTDB_BUCKET_DEVICE = "DEVICE" BOLTDB_BUCKET_BRICK = "BRICK" )
const ( // Byte values in KB KB = 1 MB = KB * 1024 GB = MB * 1024 TB = GB * 1024 // Default values DEFAULT_REPLICA = 2 DEFAULT_EC_DATA = 4 DEFAULT_EC_REDUNDANCY = 2 DEFAULT_THINP_SNAPSHOT_FACTOR = 1.5 )
const (
VOLUME_CREATE_MAX_SNAPSHOT_FACTOR = 100
)
Variables ¶
var ( ErrNoSpace = errors.New("No space") ErrNotFound = errors.New("Id not found") ErrConflict = errors.New("The target exists, contains other items, or is in use.") ErrMaxBricks = errors.New("Maximum number of bricks reached.") ErrMinimumBrickSize = errors.New("Minimum brick size limit reached. Out of space.") ErrDbAccess = errors.New("Unable to access db") ErrAccessList = errors.New("Unable to access list") ErrKeyExists = errors.New("Key already exists in the database") )
var ( // Default limits BrickMinSize = uint64(4 * GB) BrickMaxSize = uint64(4 * TB) BrickMaxNum = 32 )
Functions ¶
func CreateBricks ¶
func DestroyBricks ¶
func EntryRegister ¶
Checks if the key already exists in the database. If it does not exist, then it will save the key value pair in the datababucket se
Types ¶
type Allocator ¶
type Allocator interface { // Inform the brick allocator to include device AddDevice(c *ClusterEntry, n *NodeEntry, d *DeviceEntry) error // Inform the brick allocator to not use the specified device RemoveDevice(c *ClusterEntry, n *NodeEntry, d *DeviceEntry) error // Remove cluster information from allocator RemoveCluster(clusterId string) error // Returns a generator, done, and error channel. // The generator returns the location for the brick, then the possible locations // of its replicas. The caller must close() the done channel when it no longer // needs to read from the generator. GetNodes(clusterId, brickId string) (<-chan string, chan<- struct{}, <-chan error) }
type App ¶
type App struct {
// contains filtered or unexported fields
}
func NewTestApp ¶
func (*App) Auth ¶
func (a *App) Auth(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Middleware function
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) DeviceDelete ¶
func (a *App) DeviceDelete(w http.ResponseWriter, r *http.Request)
func (*App) DeviceInfo ¶
func (a *App) DeviceInfo(w http.ResponseWriter, r *http.Request)
func (*App) DeviceSetState ¶
func (a *App) DeviceSetState(w http.ResponseWriter, r *http.Request)
func (*App) NodeDelete ¶
func (a *App) NodeDelete(w http.ResponseWriter, r *http.Request)
func (*App) NodeSetState ¶
func (a *App) NodeSetState(w http.ResponseWriter, r *http.Request)
func (*App) NotFoundHandler ¶
func (a *App) NotFoundHandler(w http.ResponseWriter, r *http.Request)
func (*App) VolumeCreate ¶
func (a *App) VolumeCreate(w http.ResponseWriter, r *http.Request)
func (*App) VolumeDelete ¶
func (a *App) VolumeDelete(w http.ResponseWriter, r *http.Request)
func (*App) VolumeExpand ¶
func (a *App) VolumeExpand(w http.ResponseWriter, r *http.Request)
func (*App) VolumeInfo ¶
func (a *App) VolumeInfo(w http.ResponseWriter, r *http.Request)
func (*App) VolumeList ¶
func (a *App) VolumeList(w http.ResponseWriter, r *http.Request)
type BrickEntry ¶
type BrickEntry struct { Info api.BrickInfo TpSize uint64 PoolMetadataSize uint64 // contains filtered or unexported fields }
func NewBrickEntry ¶
func NewBrickEntry(size, tpsize, poolMetadataSize uint64, deviceid, nodeid string, gid int64) *BrickEntry
func NewBrickEntryFromId ¶
func NewBrickEntryFromId(tx *bolt.Tx, id string) (*BrickEntry, error)
func (*BrickEntry) BucketName ¶
func (b *BrickEntry) BucketName() string
func (*BrickEntry) DestroyCheck ¶
func (*BrickEntry) Id ¶
func (b *BrickEntry) Id() string
func (*BrickEntry) Marshal ¶
func (b *BrickEntry) Marshal() ([]byte, error)
func (*BrickEntry) NewInfoResponse ¶
func (*BrickEntry) SetId ¶
func (b *BrickEntry) SetId(id string)
func (*BrickEntry) Unmarshal ¶
func (b *BrickEntry) Unmarshal(buffer []byte) error
type ClusterEntry ¶
type ClusterEntry struct {
Info api.ClusterInfoResponse
}
func NewClusterEntry ¶
func NewClusterEntry() *ClusterEntry
func NewClusterEntryFromId ¶
func NewClusterEntryFromId(tx *bolt.Tx, id string) (*ClusterEntry, error)
func NewClusterEntryFromRequest ¶
func NewClusterEntryFromRequest() *ClusterEntry
func (*ClusterEntry) BucketName ¶
func (c *ClusterEntry) BucketName() string
func (*ClusterEntry) ConflictString ¶
func (c *ClusterEntry) ConflictString() string
func (*ClusterEntry) Marshal ¶
func (c *ClusterEntry) Marshal() ([]byte, error)
func (*ClusterEntry) NewClusterInfoResponse ¶
func (c *ClusterEntry) NewClusterInfoResponse(tx *bolt.Tx) (*api.ClusterInfoResponse, error)
func (*ClusterEntry) NodeAdd ¶
func (c *ClusterEntry) NodeAdd(id string)
func (*ClusterEntry) NodeDelete ¶
func (c *ClusterEntry) NodeDelete(id string)
func (*ClusterEntry) NodeEntryFromClusterIndex ¶
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 ConfigFile ¶
type ConfigFile struct {
GlusterFS GlusterFSConfig `json:"glusterfs"`
}
type DeviceEntry ¶
type DeviceEntry struct { Entry Info api.DeviceInfo Bricks sort.StringSlice NodeId string ExtentSize uint64 }
func NewDeviceEntry ¶
func NewDeviceEntry() *DeviceEntry
func NewDeviceEntryFromId ¶
func NewDeviceEntryFromId(tx *bolt.Tx, id string) (*DeviceEntry, error)
func NewDeviceEntryFromRequest ¶
func NewDeviceEntryFromRequest(req *api.DeviceAddRequest) *DeviceEntry
func (*DeviceEntry) BrickAdd ¶
func (d *DeviceEntry) BrickAdd(id string)
func (*DeviceEntry) BrickDelete ¶
func (d *DeviceEntry) BrickDelete(id string)
func (*DeviceEntry) BucketName ¶
func (d *DeviceEntry) BucketName() string
func (*DeviceEntry) ConflictString ¶
func (d *DeviceEntry) ConflictString() string
func (*DeviceEntry) Deregister ¶
func (d *DeviceEntry) Deregister(tx *bolt.Tx) error
func (*DeviceEntry) Id ¶
func (d *DeviceEntry) Id() string
func (*DeviceEntry) IsDeleteOk ¶
func (d *DeviceEntry) IsDeleteOk() bool
func (*DeviceEntry) Marshal ¶
func (d *DeviceEntry) Marshal() ([]byte, error)
func (*DeviceEntry) NewBrickEntry ¶
func (d *DeviceEntry) NewBrickEntry(amount uint64, snapFactor float64, gid int64) *BrickEntry
Allocates a new brick if the space is available. It will automatically reserve the storage amount required from the device's used storage, but it will not add the brick id to the brick list. The caller is responsabile for adding the brick id to the list.
func (*DeviceEntry) NewInfoResponse ¶
func (d *DeviceEntry) NewInfoResponse(tx *bolt.Tx) (*api.DeviceInfoResponse, error)
func (*DeviceEntry) SetExtentSize ¶
func (d *DeviceEntry) SetExtentSize(amount uint64)
func (*DeviceEntry) SetId ¶
func (d *DeviceEntry) SetId(id string)
func (*DeviceEntry) SetState ¶
func (d *DeviceEntry) SetState(tx *bolt.Tx, a Allocator, s api.EntryState) error
func (*DeviceEntry) StorageAllocate ¶
func (d *DeviceEntry) StorageAllocate(amount uint64)
func (*DeviceEntry) StorageCheck ¶
func (d *DeviceEntry) StorageCheck(amount uint64) bool
func (*DeviceEntry) StorageFree ¶
func (d *DeviceEntry) StorageFree(amount uint64)
func (*DeviceEntry) StorageSet ¶
func (d *DeviceEntry) StorageSet(amount uint64)
func (*DeviceEntry) Unmarshal ¶
func (d *DeviceEntry) Unmarshal(buffer []byte) error
type Entry ¶
type Entry struct {
State api.EntryState
}
type GlusterFSConfig ¶
type GlusterFSConfig struct { DBfile string `json:"db"` Executor string `json:"executor"` Allocator string `json:"allocator"` SshConfig sshexec.SshConfig `json:"sshexec"` KubeConfig kubeexec.KubeConfig `json:"kubeexec"` Loglevel string `json:"loglevel"` // advanced settings BrickMaxSize int `json:"brick_max_size_gb"` BrickMinSize int `json:"brick_min_size_gb"` BrickMaxNum int `json:"max_bricks_per_volume"` }
type MockAllocator ¶
type MockAllocator struct {
// contains filtered or unexported fields
}
func NewMockAllocator ¶
func NewMockAllocator(db *bolt.DB) *MockAllocator
func (*MockAllocator) AddDevice ¶
func (d *MockAllocator) AddDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
func (*MockAllocator) GetNodes ¶
func (d *MockAllocator) GetNodes(clusterId, brickId string) (<-chan string, chan<- struct{}, <-chan error)
func (*MockAllocator) RemoveCluster ¶
func (d *MockAllocator) RemoveCluster(clusterId string) error
func (*MockAllocator) RemoveDevice ¶
func (d *MockAllocator) RemoveDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
type NodeEntry ¶
type NodeEntry struct { Entry Info api.NodeInfo Devices sort.StringSlice }
func NewNodeEntry ¶
func NewNodeEntry() *NodeEntry
func NewNodeEntryFromRequest ¶
func NewNodeEntryFromRequest(req *api.NodeAddRequest) *NodeEntry
func (*NodeEntry) BucketName ¶
func (*NodeEntry) ConflictString ¶
func (*NodeEntry) DeviceDelete ¶
func (*NodeEntry) IsDeleteOk ¶
func (*NodeEntry) ManageHostName ¶
func (*NodeEntry) NewInfoReponse ¶
func (*NodeEntry) StorageHostName ¶
type NoneDurability ¶
type NoneDurability struct {
VolumeReplicaDurability
}
func NewNoneDurability ¶
func NewNoneDurability() *NoneDurability
func (*NoneDurability) BricksInSet ¶
func (n *NoneDurability) BricksInSet() int
func (*NoneDurability) SetDurability ¶
func (n *NoneDurability) SetDurability()
func (*NoneDurability) SetExecutorVolumeRequest ¶
func (n *NoneDurability) SetExecutorVolumeRequest(v *executors.VolumeRequest)
type SimpleAllocator ¶
type SimpleAllocator struct {
// contains filtered or unexported fields
}
Simple allocator contains a map to rings of clusters
func NewSimpleAllocatorFromDb ¶
func NewSimpleAllocatorFromDb(db *bolt.DB) *SimpleAllocator
Create a new simple allocator and initialize it with data from the db
func (*SimpleAllocator) AddDevice ¶
func (s *SimpleAllocator) AddDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
func (*SimpleAllocator) GetNodes ¶
func (s *SimpleAllocator) GetNodes(clusterId, brickId string) (<-chan string, chan<- struct{}, <-chan error)
func (*SimpleAllocator) RemoveCluster ¶
func (s *SimpleAllocator) RemoveCluster(clusterId string) error
func (*SimpleAllocator) RemoveDevice ¶
func (s *SimpleAllocator) RemoveDevice(cluster *ClusterEntry, node *NodeEntry, device *DeviceEntry) error
type SimpleAllocatorRing ¶
type SimpleAllocatorRing struct {
// contains filtered or unexported fields
}
The allocation ring will contain a map composed of all the devices available in the cluster. Call Rebalance() for it to create a balanced list.
func NewSimpleAllocatorRing ¶
func NewSimpleAllocatorRing() *SimpleAllocatorRing
Create a new simple ring
func (*SimpleAllocatorRing) Add ¶
func (s *SimpleAllocatorRing) Add(d *SimpleDevice)
Add a device to the ring map
func (*SimpleAllocatorRing) GetDeviceList ¶
func (s *SimpleAllocatorRing) GetDeviceList(uuid string) SimpleDevices
Use a uuid to point at a position in the ring. Return a list of devices from that point in the ring.
func (*SimpleAllocatorRing) Rebalance ¶
func (s *SimpleAllocatorRing) Rebalance()
Rebalance the ring and place the rebalanced list into balancedList. The idea is to setup an array/slice where each continguous SimpleDevice is from either a different zone, or node.
func (*SimpleAllocatorRing) Remove ¶
func (s *SimpleAllocatorRing) Remove(d *SimpleDevice)
Remove device from the ring map
type SimpleDevice ¶
type SimpleDevice struct {
// contains filtered or unexported fields
}
Elements in the balanced list
type SimpleDevices ¶
type SimpleDevices []SimpleDevice
Simple Devices so that we have no pointers and no race conditions
type VolumeDisperseDurability ¶
type VolumeDisperseDurability struct {
api.DisperseDurability
}
func NewVolumeDisperseDurability ¶
func NewVolumeDisperseDurability(d *api.DisperseDurability) *VolumeDisperseDurability
func (*VolumeDisperseDurability) BrickSizeGenerator ¶
func (d *VolumeDisperseDurability) BrickSizeGenerator(size uint64) func() (int, uint64, error)
func (*VolumeDisperseDurability) BricksInSet ¶
func (d *VolumeDisperseDurability) BricksInSet() int
func (*VolumeDisperseDurability) MinVolumeSize ¶
func (d *VolumeDisperseDurability) MinVolumeSize() uint64
func (*VolumeDisperseDurability) SetDurability ¶
func (d *VolumeDisperseDurability) SetDurability()
func (*VolumeDisperseDurability) SetExecutorVolumeRequest ¶
func (d *VolumeDisperseDurability) SetExecutorVolumeRequest(v *executors.VolumeRequest)
type VolumeDurability ¶
type VolumeEntry ¶
type VolumeEntry struct { Info api.VolumeInfo Bricks sort.StringSlice Durability VolumeDurability // contains filtered or unexported fields }
func NewVolumeEntry ¶
func NewVolumeEntry() *VolumeEntry
func NewVolumeEntryFromId ¶
func NewVolumeEntryFromId(tx *bolt.Tx, id string) (*VolumeEntry, error)
func NewVolumeEntryFromRequest ¶
func NewVolumeEntryFromRequest(req *api.VolumeCreateRequest) *VolumeEntry
func (*VolumeEntry) BrickAdd ¶
func (v *VolumeEntry) BrickAdd(id string)
func (*VolumeEntry) BrickDelete ¶
func (v *VolumeEntry) BrickDelete(id string)
func (*VolumeEntry) BricksIds ¶
func (v *VolumeEntry) BricksIds() sort.StringSlice
func (*VolumeEntry) BucketName ¶
func (v *VolumeEntry) BucketName() string
func (*VolumeEntry) Marshal ¶
func (v *VolumeEntry) Marshal() ([]byte, error)
func (*VolumeEntry) NewInfoResponse ¶
func (v *VolumeEntry) NewInfoResponse(tx *bolt.Tx) (*api.VolumeInfoResponse, error)
func (*VolumeEntry) Unmarshal ¶
func (v *VolumeEntry) Unmarshal(buffer []byte) error
type VolumeReplicaDurability ¶
type VolumeReplicaDurability struct {
api.ReplicaDurability
}
func NewVolumeReplicaDurability ¶
func NewVolumeReplicaDurability(r *api.ReplicaDurability) *VolumeReplicaDurability
func (*VolumeReplicaDurability) BrickSizeGenerator ¶
func (r *VolumeReplicaDurability) BrickSizeGenerator(size uint64) func() (int, uint64, error)
func (*VolumeReplicaDurability) BricksInSet ¶
func (r *VolumeReplicaDurability) BricksInSet() int
func (*VolumeReplicaDurability) MinVolumeSize ¶
func (r *VolumeReplicaDurability) MinVolumeSize() uint64
func (*VolumeReplicaDurability) SetDurability ¶
func (r *VolumeReplicaDurability) SetDurability()
func (*VolumeReplicaDurability) SetExecutorVolumeRequest ¶
func (r *VolumeReplicaDurability) SetExecutorVolumeRequest(v *executors.VolumeRequest)
Source Files ¶
- allocator.go
- allocator_mock.go
- allocator_simple.go
- allocator_simple_ring.go
- app.go
- app_cluster.go
- app_config.go
- app_device.go
- app_node.go
- app_volume.go
- brick_create.go
- brick_entry.go
- cluster_entry.go
- dbentry.go
- device_entry.go
- entry.go
- errors.go
- limits.go
- node_entry.go
- testapp_mock.go
- volume_durability.go
- volume_durability_ec.go
- volume_durability_none.go
- volume_durability_replica.go
- volume_entry.go
- volume_entry_allocate.go
- volume_entry_create.go