Documentation ¶
Index ¶
Constants ¶
const DEBUG = false
Toogle for switching to debug mode & verbose logs
const FilesetNamePrefix string = "fs-"
Prefix for the filesets name - default
const TenantIDMock string = "tmock"
Mock for the default Tenant ID
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientContext ¶
type ClientContext struct { // VRFS service Vrfs rservice.VrfsService // File Transfer service Nfs rservice.FTService }
Client application context grouping the accesses to remote services
func NewClientContext ¶
func NewClientContext(vrfsEndpoint string, nfsEndpoint string, chunkSize int) (*ClientContext, error)
Init the application context
func (*ClientContext) DownloadFile ¶
func (ctx *ClientContext) DownloadFile(fileSetID string, fileIndex int, downDirPath string) error
DownloadFile is the method for downloading a file, from its index as part of a known fileset, to the specified local directory from the Remote FS store and Verify its consistency, i.e. the hash of the downloaded file and the merkle proofs downloaded from VRFS are verified against the expected fileset's merkle tree root.
The specified fileset ID is the one provided by the VRFS service when the fileset was initially uploaded. The local directory FS path for the file to be downloaded must also to specified, e.g. './localdowndir/'.
An error is returned in case an issue is met.
func (*ClientContext) UploadFileset ¶
func (ctx *ClientContext) UploadFileset(localDirPath string, concurrencyMax int) error
UploadFileset is the method for initiating the verified upload protocol of all files found under the specified local directory path The maximum batch size of files to be concurrently uploaded is specified, it must be greater than 0