Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates a key is not in the store. ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type DiskStatus ¶
type DiskStatus struct { All uint64 `json:"all"` Used uint64 `json:"used"` Free uint64 `json:"free"` }
func DiskUsage ¶
func DiskUsage(path string) (disk DiskStatus, err error)
DiskUsage returns the disk usage of path
type DiskStore ¶
type DiskStore struct {
// contains filtered or unexported fields
}
DiskStore implements Store.
func NewDiskStore ¶
type RemoteStore ¶
type RemoteStore struct {
// contains filtered or unexported fields
}
RemoteStore implements Store. It requires to connect to a blobserver.
func (*RemoteStore) Delete ¶
func (r *RemoteStore) Delete(key []byte) (err error)
func (*RemoteStore) Put ¶
func (r *RemoteStore) Put(key, value []byte) (err error)
func (*RemoteStore) Stats ¶
func (s *RemoteStore) Stats() (*Stats, error)
func (*RemoteStore) String ¶
func (s *RemoteStore) String() string
type Store ¶
type Store interface { fmt.Stringer Put(key, value []byte) (err error) // Get should return ErrNotFound if the key is not in the store. Get(key []byte) (value []byte, err error) // Delete should return ErrNotFound if the ksy is not in the store. Delete(key []byte) (err error) Stats() (*Stats, error) }
Store represents a key-value store.
func NewBeyondStore ¶
func NewRemoteStore ¶
Click to show internal directories.
Click to hide internal directories.