file

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 16 Imported by: 0

README

/pkg/rsstorage/servers/file

Description

A storage server implementation for file-based storage. Suitable for shared or non-shared file systems.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStorageServer

func NewStorageServer(args StorageServerArgs) rsstorage.StorageServer

Types

type StatfsData added in v2.0.2

type StatfsData struct {
	Bfree  uint64
	Bsize  int64
	Blocks uint64
}

func Statfs added in v2.0.2

func Statfs(path string) (*StatfsData, error)

type StorageServer

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

func (*StorageServer) Base

func (*StorageServer) CalculateUsage

func (s *StorageServer) CalculateUsage() (types.Usage, error)

func (*StorageServer) Check

func (s *StorageServer) Check(dir, address string) (bool, *types.ChunksInfo, int64, time.Time, error)

func (*StorageServer) Copy

func (s *StorageServer) Copy(dir, address string, server rsstorage.StorageServer) error

func (*StorageServer) Dir

func (s *StorageServer) Dir() string

func (*StorageServer) Enumerate

func (s *StorageServer) Enumerate() ([]types.StoredItem, error)

func (*StorageServer) Flush

func (s *StorageServer) Flush(dir, address string)

func (*StorageServer) Get

func (s *StorageServer) Get(dir, address string) (io.ReadCloser, *types.ChunksInfo, int64, time.Time, bool, error)

func (*StorageServer) Locate

func (s *StorageServer) Locate(dir, address string) string

func (*StorageServer) Move

func (s *StorageServer) Move(dir, address string, server rsstorage.StorageServer) error

func (*StorageServer) Put

func (s *StorageServer) Put(resolve types.Resolver, dir, address string) (string, string, error)

func (*StorageServer) PutChunked

func (s *StorageServer) PutChunked(resolve types.Resolver, dir, address string, sz uint64) (string, string, error)

func (*StorageServer) Remove

func (s *StorageServer) Remove(dir, address string) error

func (*StorageServer) Type

func (s *StorageServer) Type() types.StorageType

type StorageServerArgs

type StorageServerArgs struct {
	Dir          string
	ChunkSize    uint64
	Waiter       rsstorage.ChunkWaiter
	Notifier     rsstorage.ChunkNotifier
	Class        string
	CacheTimeout time.Duration
	WalkTimeout  time.Duration
}

Jump to

Keyboard shortcuts

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