glusterfs

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package glusterfs contains the internal representation of glusterfs volumes.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = errors.New("number not allocated")
	ErrConflict     = errors.New("number already allocated")
	ErrInvalidRange = errors.New("invalid range")
	ErrOutOfRange   = errors.New("out of range")
	ErrRangeFull    = errors.New("range full")
	ErrInternal     = errors.New("internal error")
)

Functions

func ProbeVolumePlugins

func ProbeVolumePlugins() []volume.VolumePlugin

This is the primary entrypoint for volume plugins.

Types

type MinMaxAllocator added in v1.6.0

type MinMaxAllocator struct {
	// contains filtered or unexported fields
}

func NewMinMaxAllocator added in v1.6.0

func NewMinMaxAllocator(min, max int) (*MinMaxAllocator, error)

func (*MinMaxAllocator) Allocate added in v1.6.0

func (a *MinMaxAllocator) Allocate(i int) (bool, error)

func (*MinMaxAllocator) AllocateNext added in v1.6.0

func (a *MinMaxAllocator) AllocateNext() (int, bool, error)

func (*MinMaxAllocator) Free added in v1.6.0

func (a *MinMaxAllocator) Free() int

func (*MinMaxAllocator) Has added in v1.6.0

func (a *MinMaxAllocator) Has(i int) bool

func (*MinMaxAllocator) Release added in v1.6.0

func (a *MinMaxAllocator) Release(i int) error

func (*MinMaxAllocator) SetRange added in v1.6.0

func (a *MinMaxAllocator) SetRange(min, max int) error

type Rangeable added in v1.6.0

type Rangeable interface {
	Allocate(int) (bool, error)
	AllocateNext() (int, bool, error)
	Release(int) error
	Has(int) bool
	Free() int
	SetRange(min, max int) error
}

Rangeable is an Interface that can adjust its min/max range. Rangeable should be threadsafe

Jump to

Keyboard shortcuts

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