Documentation
¶
Index ¶
- Constants
- Variables
- func CloseLog()
- func GetVersion() string
- func SetLogFile(logFile string, verbose bool)
- func SetLogLevel(lvl int)
- type Allocation
- func (obj *Allocation) AddDir(path string) error
- func (obj *Allocation) Commit() error
- func (obj *Allocation) DeleteFile(remotePath string) error
- func (obj *Allocation) DownloadCancel()
- func (obj *Allocation) DownloadFile(remotePath, localPath string, statusCb StatusCallback) error
- func (obj *Allocation) DownloadFileFromShareLink(localPath string, authTokenB64 string, statusCb StatusCallback) error
- func (obj *Allocation) GetBlobbers() string
- func (obj *Allocation) GetDirTree() string
- func (obj *Allocation) GetFileStats(remotePath string) string
- func (obj *Allocation) GetShareAuthToken(remotePath string, clientID string) string
- func (obj *Allocation) ListDir(path string) string
- func (obj *Allocation) RepairFile(localPath, remotePath string, statusCb StatusCallback) error
- func (obj *Allocation) SetConfig(clientJson, dirTreeJson, blobbersJson string, iDataShards, iParityShard int) error
- func (obj *Allocation) UpdateFile(localPath, remotePath string, statusCb StatusCallback) error
- func (obj *Allocation) UploadFile(localPath, remotePath string, statusCb StatusCallback) error
- func (obj *Allocation) UploadOrRepairFile(localPath, remotePath string, statusCb StatusCallback) error
- type StatusCallback
Constants ¶
View Source
const ( OpUpload int = 0 OpDownload int = 1 OpRepair int = 2 )
View Source
const CHUNK_SIZE = (64 * 1024)
Variables ¶
View Source
var Logger logger.Logger
Functions ¶
func SetLogFile ¶
logFile - Log file verbose - true - console output; false - no console output
func SetLogLevel ¶
func SetLogLevel(lvl int)
lvl - 0 disabled; higher number (upto 4) more verbosity
Types ¶
type Allocation ¶
type Allocation struct {
// contains filtered or unexported fields
}
func CreateInstance ¶
func CreateInstance(allocationId string) (*Allocation, error)
func (*Allocation) AddDir ¶
func (obj *Allocation) AddDir(path string) error
func (*Allocation) Commit ¶
func (obj *Allocation) Commit() error
func (*Allocation) DeleteFile ¶
func (obj *Allocation) DeleteFile(remotePath string) error
func (*Allocation) DownloadFile ¶
func (obj *Allocation) DownloadFile(remotePath, localPath string, statusCb StatusCallback) error
func (*Allocation) DownloadFileFromShareLink ¶
func (obj *Allocation) DownloadFileFromShareLink(localPath string, authTokenB64 string, statusCb StatusCallback) error
func (*Allocation) GetBlobbers ¶
func (obj *Allocation) GetBlobbers() string
func (*Allocation) GetDirTree ¶
func (obj *Allocation) GetDirTree() string
func (*Allocation) GetFileStats ¶
func (obj *Allocation) GetFileStats(remotePath string) string
func (*Allocation) GetShareAuthToken ¶
func (obj *Allocation) GetShareAuthToken(remotePath string, clientID string) string
func (*Allocation) ListDir ¶
func (obj *Allocation) ListDir(path string) string
func (*Allocation) RepairFile ¶
func (obj *Allocation) RepairFile(localPath, remotePath string, statusCb StatusCallback) error
func (*Allocation) SetConfig ¶
func (obj *Allocation) SetConfig(clientJson, dirTreeJson, blobbersJson string, iDataShards, iParityShard int) error
func (*Allocation) UpdateFile ¶
func (obj *Allocation) UpdateFile(localPath, remotePath string, statusCb StatusCallback) error
func (*Allocation) UploadFile ¶
func (obj *Allocation) UploadFile(localPath, remotePath string, statusCb StatusCallback) error
func (*Allocation) UploadOrRepairFile ¶
func (obj *Allocation) UploadOrRepairFile(localPath, remotePath string, statusCb StatusCallback) error
Click to show internal directories.
Click to hide internal directories.