Documentation ¶
Index ¶
- func New(srv storageIface.Service, factory kvdb.Factory, ...) (storageIface.Storage, error)
- type Meta
- type Store
- func (s *Store) AddFile(ctx context.Context, r io.ReadSeeker, name string, replace bool) (version int, err error)
- func (s *Store) Application() string
- func (s *Store) Capacity() (capacity int)
- func (s *Store) Close()
- func (s *Store) Config() *structureSpec.Storage
- func (s *Store) Context() context.Context
- func (s *Store) ContextConfig() storageIface.Context
- func (s *Store) DeleteFile(ctx context.Context, name string, version int) error
- func (s *Store) Event() interface{}
- func (s *Store) GetLatestVersion(ctx context.Context, name string) (int, error)
- func (s *Store) Id() string
- func (s *Store) Kvdb() kvdb.KVDB
- func (s *Store) List(ctx context.Context, prefix string) ([]string, error)
- func (s *Store) ListVersions(ctx context.Context, name string) ([]string, error)
- func (s *Store) Meta(ctx context.Context, name string, version int) (storageIface.Meta, error)
- func (s *Store) Project() string
- func (s *Store) SmartOps() (uint32, error)
- func (s *Store) Type() uint32
- func (s *Store) UpdateCapacity(size uint64)
- func (s *Store) Used(ctx context.Context) (used int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(srv storageIface.Service, factory kvdb.Factory, storageContext storageIface.Context, logger log.StandardLogger, matches map[string]kvdb.KVDB) (storageIface.Storage, error)
Types ¶
type Store ¶
func (*Store) AddFile ¶
func (s *Store) AddFile(ctx context.Context, r io.ReadSeeker, name string, replace bool) (version int, err error)
TODO: Version/timestamp:: What happens when 2 nodes try to update version at same time?
func (*Store) Application ¶
func (*Store) Config ¶
func (s *Store) Config() *structureSpec.Storage
func (*Store) ContextConfig ¶
func (s *Store) ContextConfig() storageIface.Context
func (*Store) DeleteFile ¶
version 0 for latest version, -1 for all
func (*Store) GetLatestVersion ¶
func (*Store) ListVersions ¶
func (*Store) UpdateCapacity ¶
Click to show internal directories.
Click to hide internal directories.