dmlite
0.6
|
C wrapper for DMLite Pool API. More...
Go to the source code of this file.
Classes | |
struct | dmlite_pool |
Pool data. More... | |
struct | dmlite_chunk |
Chunk of data. More... | |
struct | dmlite_location |
Collection of chunks that form a replica. More... | |
struct | dmlite_xferinfo |
Progress markers for file copies. FTS jargon calls these "FTS performance markers". More... | |
Macros | |
#define | POOL_TYPE_MAX 16 |
#define | POOL_MAX 16 |
#define | CHUNK_ID_MAX 16 |
#define | CHUNK_URL_ALT_MAX 512 |
Typedefs | |
typedef struct dmlite_pool | dmlite_pool |
Pool data. More... | |
typedef struct dmlite_chunk | dmlite_chunk |
Chunk of data. More... | |
typedef struct dmlite_location | dmlite_location |
Collection of chunks that form a replica. More... | |
typedef struct dmlite_xferinfo | dmlite_xferinfo |
Progress markers for file copies. FTS jargon calls these "FTS performance markers". More... | |
Functions | |
int | dmlite_getpools (dmlite_context *context, unsigned *nPools, dmlite_pool **pools) |
Gets the list of pools. More... | |
int | dmlite_pools_free (unsigned nPools, dmlite_pool *pools) |
Frees an array of pools. More... | |
dmlite_location * | dmlite_get (dmlite_context *context, const char *path) |
Gets a single replica (synchronous). More... | |
int | dmlite_copypush (dmlite_context *context, const char *path, const char *dest, int cksumcheck, char *cksumtype, dmlite_xferinfo *progressdata) |
Copy a file to a remote location (synchronous). More... | |
int | dmlite_copypull (dmlite_context *context, const char *path, const char *source, int cksumcheck, char *cksumtype, dmlite_xferinfo *progressdata) |
Copy a file from a remote location (synchronous). Allows copying to this head node, may add a replica to an existing logical file entry. More... | |
dmlite_location * | dmlite_iget (dmlite_context *context, ino_t inode) |
Gets a single replica (synchronous). More... | |
dmlite_location * | dmlite_getlocation (dmlite_context *context, const dmlite_replica *replica) |
Gets the location of a replica. More... | |
dmlite_location * | dmlite_put (dmlite_context *context, const char *path) |
Puts a file (synchronous). More... | |
dmlite_location * | dmlite_chooseserver (dmlite_context *context, const char *path) |
Choose a server where to perform generic actions (e.g. a tunnel) More... | |
int | dmlite_put_abort (dmlite_context *context, const dmlite_location *loc) |
Aborts a put request. More... | |
int | dmlite_location_free (dmlite_location *loc) |
Frees a location struct. More... | |
int | dmlite_getdirspaces (dmlite_context *context, const char *logicaldir, int64_t *freespace, int64_t *used) |
Get the estimation of the free/used space for writing into a directory. More... | |
C wrapper for DMLite Pool API.
#define CHUNK_ID_MAX 16 |
#define CHUNK_URL_ALT_MAX 512 |
#define POOL_MAX 16 |
#define POOL_TYPE_MAX 16 |
typedef struct dmlite_chunk dmlite_chunk |
Chunk of data.
typedef struct dmlite_location dmlite_location |
Collection of chunks that form a replica.
On read, there may be duplicated chunks.
typedef struct dmlite_pool dmlite_pool |
Pool data.
typedef struct dmlite_xferinfo dmlite_xferinfo |
Progress markers for file copies. FTS jargon calls these "FTS performance markers".
dmlite_location* dmlite_chooseserver | ( | dmlite_context * | context, |
const char * | path | ||
) |
Choose a server where to perform generic actions (e.g. a tunnel)
context | The DM context. |
path | The logical file name to put. |
int dmlite_copypull | ( | dmlite_context * | context, |
const char * | path, | ||
const char * | source, | ||
int | cksumcheck, | ||
char * | cksumtype, | ||
dmlite_xferinfo * | progressdata | ||
) |
Copy a file from a remote location (synchronous). Allows copying to this head node, may add a replica to an existing logical file entry.
context | The DM context. |
path | The logical file name. |
source | An URL, that may be a remote destination |
cksumcheck | Tell the copy process to check the final checksums |
cksumtype | Type of checksum that must be checked (e.g. adler32) |
Beware, the path to the delegated proxy (if any) is stored in the dmlite context
int dmlite_copypush | ( | dmlite_context * | context, |
const char * | path, | ||
const char * | dest, | ||
int | cksumcheck, | ||
char * | cksumtype, | ||
dmlite_xferinfo * | progressdata | ||
) |
Copy a file to a remote location (synchronous).
context | The DM context. |
path | The logical file name. |
dest | An URL, that must be a remote destination |
cksumcheck | Tell the copy process to check the final checksums |
cksumtype | Type of checksum that must be checked (e.g. adler32) |
Beware, the path to the delegated proxy (if any) is stored in the dmlite context
dmlite_location* dmlite_get | ( | dmlite_context * | context, |
const char * | path | ||
) |
Gets a single replica (synchronous).
context | The DM context. |
path | The logical file name. |
int dmlite_getdirspaces | ( | dmlite_context * | context, |
const char * | logicaldir, | ||
int64_t * | freespace, | ||
int64_t * | used | ||
) |
Get the estimation of the free/used space for writing into a directory.
path | The path of the directory to query |
totalfree | The total number of free bytes (may not be contiguous) |
used | The total number of used bytes |
dmlite_location* dmlite_getlocation | ( | dmlite_context * | context, |
const dmlite_replica * | replica | ||
) |
Gets the location of a replica.
context | The DM context. |
replica | The replica to translate. |
int dmlite_getpools | ( | dmlite_context * | context, |
unsigned * | nPools, | ||
dmlite_pool ** | pools | ||
) |
Gets the list of pools.
context | The DM context. |
nPools | The number of pools. |
pools | An array with the pools. Use dmlite_freepools to free. |
dmlite_location* dmlite_iget | ( | dmlite_context * | context, |
ino_t | inode | ||
) |
Gets a single replica (synchronous).
context | The DM context. |
inode | The file inode. |
int dmlite_location_free | ( | dmlite_location * | loc | ) |
Frees a location struct.
loc | The struct to free. |
int dmlite_pools_free | ( | unsigned | nPools, |
dmlite_pool * | pools | ||
) |
Frees an array of pools.
nPools | The number of pools in the array. |
pools | The array to free. |
dmlite_location* dmlite_put | ( | dmlite_context * | context, |
const char * | path | ||
) |
Puts a file (synchronous).
context | The DM context. |
path | The logical file name to put. |
int dmlite_put_abort | ( | dmlite_context * | context, |
const dmlite_location * | loc | ||
) |
Aborts a put request.
context | The DM context. |
loc | As returned by dmlite_put. |