GLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_COMPLETE_CB_T(3)
π globus_ftp_client_restart_marker_plugin β the Library Functions Manual glow-up β¨
okay bestie, buckle up, we're reading globus_ftp_client_restart_marker_plugin(3) together and it's actually SO good. this is the Restart Marker Plugin. that's it, that's the name. also the name. yes it says it twice, she contains multitudes π
πΈ NAME πΈ
globus_ftp_client_restart_marker_plugin β Restart Marker Plugin.
and like⦠Restart Marker Plugin. again. periodt.
π SYNOPSIS π
β¨ Macros β¨
#define GLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_MODULE(&globus_i_ftp_client_restart_marker_plugin_module)
π¦ Typedefs π¦
typedef globus_bool_t (*globus_ftp_client_restart_marker_plugin_begin_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url, globus_ftp_client_restart_marker_t *user_saved_marker)β the Transfer begin callback.typedef void (*globus_ftp_client_restart_marker_plugin_marker_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_ftp_client_restart_marker_t *marker)typedef void (*globus_ftp_client_restart_marker_plugin_complete_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_object_t *error, const char *error_url)
π Functions π
globus_result_t globus_ftp_client_restart_marker_plugin_init (globus_ftp_client_plugin_t *plugin, globus_ftp_client_restart_marker_plugin_begin_cb_t begin_cb, globus_ftp_client_restart_marker_plugin_marker_cb_t marker_cb, globus_ftp_client_restart_marker_plugin_complete_cb_t complete_cb, void *user_arg)globus_result_t globus_ftp_client_restart_marker_plugin_destroy (globus_ftp_client_plugin_t *plugin)
π« Detailed Description π«
Restart Marker Plugin. (she said it again, iconic behavior)
so here's the vibe: this plugin exists so you can make your restart markers persistent. like, actually remember them across app crashes, which is kind of a big deal π«Ά
during a transfer, every single marker that comes in β your 'marker' callback gets called with the shiny new restart marker, and you can store it wherever you want.
and THEN β the plot twist β if your application were to prematurely terminate (while transferring, mid-vibe, tragic), you (after restarting the application) could pass that stored marker back to the plugin through the 'begin' callback, which forces the transfer to restart from the last marked point. no cap, that's the whole magic trick β¨
π§ Macro Definition Documentation π§
#define GLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_MODULE
(&globus_i_ftp_client_restart_marker_plugin_module)
Module descriptor π
πΈ Typedef Documentation πΈ
π typedef globus_bool_t (*globus_ftp_client_restart_marker_plugin_begin_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, const char *source_url, const char *dest_url, globus_ftp_client_restart_marker_t *user_saved_marker)
Transfer begin callback. this one gets called when a get, put, or third party transfer is started. main character energy fr.
the intended use here: you take the transfer urls and go hunting for a restart marker in some persistent storage. if you find one, copy it into 'user_saved_marker' and return GLOBUS_TRUE. that makes the transfer restart using that marker π― if you don't find one, return GLOBUS_FALSE to say "nope, nothing saved, run it from the beginning."
either way, this is also your moment to set up any storage you want in anticipation of restart markers for this transfer. prep era β¨
Parameters
handleβ this the client handle that this transfer will be occurring onuser_argβ this is theuser_argpassed to the init funcsource_urlβ source of the transfer (GLOBUS_NULLif'put')dest_urlβ dest of the transfer (GLOBUS_NULLif'get')user_saved_markerβ pointer to an initialized restart marker
Returns
GLOBUS_TRUEto indicate that the plugin should use'user_saved_marker'to restart the transfer (and subsequently, destroy the marker)GLOBUS_FALSEto indicate that'user_saved_marker'has not been modified, and that the transfer should proceed normally
π¦ typedef void (*globus_ftp_client_restart_marker_plugin_complete_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_object_t *error, const char *error_url)
Transfer complete callback
this one shows up upon transfer completion (successful or otherwise β we don't discriminate, we celebrate all endings π).
Parameters
handleβ this the client handle that this transfer was occurring onuser_argβ this is theuser_argpassed to the init funcerrorβ the error object indicating what went wrong (GLOBUS_NULLon success)error_urlβ the url which is the source of the above error (GLOBUS_NULLon success)
Returns
- n/a
π typedef void (*globus_ftp_client_restart_marker_plugin_marker_cb_t) (void *user_arg, globus_ftp_client_handle_t *handle, globus_ftp_client_restart_marker_t *marker)
Restart marker received callback
called every time a restart marker is available. every time. she's consistent π
now the important bits, bestie: to receive restart markers in a 'put' or 'third_party_transfer', the transfer must be in Extended Block mode. 'get' transfers get their markers generated internally instead. and markers generated internally will be 'sent' at most, once per second. okay so don't come for her about the frequency, that's the spec π«Ά
the intended use: let the user store this marker (most likely in place of any previous marker) in a format that the 'begin_cb' can parse and pass back. like a little time capsule you dig up later π
Parameters
handleβ this the client handle that this transfer is occurring onuser_argβ this is theuser_argpassed to the init funcmarkerβ the restart marker that has been received. This marker is owned by the caller. The user must use the copy method to keep it.
Note from the devs (verbatim, they're thinking out loud): this restart marker currently contains all ranges received as of yet. Should I instead only pass a marker with the ranges just made available? If so, the user may need a way to combine restart markers (globus_ftp_client_restart_marker_combine).
Returns
- n/a
π₯ Function Documentation π₯
π globus_result_t globus_ftp_client_restart_marker_plugin_destroy (globus_ftp_client_plugin_t * plugin)
Destroy restart marker plugin
frees up memory associated with plugin. she's done, she's resting, she's at peace π§
Parameters
pluginβ plugin previously initialized with init (above)
Returns
GLOBUS_SUCCESS- Error on NULL plugin
β globus_result_t globus_ftp_client_restart_marker_plugin_init (globus_ftp_client_plugin_t * plugin, globus_ftp_client_restart_marker_plugin_begin_cb_t begin_cb, globus_ftp_client_restart_marker_plugin_marker_cb_t marker_cb, globus_ftp_client_restart_marker_plugin_complete_cb_t complete_cb, void * user_arg)
Initialize a restart marker plugin
this function initializes a restart marker plugin. any params except for the plugin may be GLOBUS_NULL. yes, all of them, she's flexible like that π
Parameters
pluginβ a pointer to a plugin type to be initializeduser_argβ a pointer to some user specific data that will be provided to all callbacksbegin_cbβ the callback to be called upon the start of a transfermarker_cbβ the callback to be called with every restart marker receivedcomplete_cbβ the callback to be called to indicate transfer completion
Returns
GLOBUS_SUCCESS- Error on NULL plugin
- Error on init internal plugin
π Author π
Generated automatically by Doxygen for globus_ftp_client from the source code. (not a human, not a bestie, but she did great tbh)
and that's the whole page, you ate it π«Ά this was globus_ftp_client Version 9.9 of the Library Functions Manual, globus_ftp_client_restart_marker_plugin(3) β stay persistent, stay marked, mwah πβ¨
π¦ where this page comes from
- epel 10: globus-ftp-client-doc 9.9-1.el10_2 Β· Apache-2.0
- fedora 43: globus-ftp-client-doc 9.9-1.fc43 Β· Apache-2.0
- fedora 44: globus-ftp-client-doc 9.9-2.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-ftp-client-doc 9.9-1 Β· Apache-2.0
- ubuntu stonking: libglobus-ftp-client-doc 9.9-2build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms