GLOBUS_FTP_CLIENT_RESTART_MARKER_PLUGIN_COMPLETE_CB_T(3)

πŸ“¦
version 9.9 Β· 6 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– 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 on
  • user_arg β€” this is the user_arg passed to the init func
  • source_url β€” source of the transfer (GLOBUS_NULL if 'put')
  • dest_url β€” dest of the transfer (GLOBUS_NULL if 'get')
  • user_saved_marker β€” pointer to an initialized restart marker

Returns

  • GLOBUS_TRUE to indicate that the plugin should use 'user_saved_marker' to restart the transfer (and subsequently, destroy the marker)
  • GLOBUS_FALSE to 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 on
  • user_arg β€” this is the user_arg passed to the init func
  • error β€” the error object indicating what went wrong (GLOBUS_NULL on success)
  • error_url β€” the url which is the source of the above error (GLOBUS_NULL on 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 on
  • user_arg β€” this is the user_arg passed to the init func
  • marker β€” 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 initialized
  • user_arg β€” a pointer to some user specific data that will be provided to all callbacks
  • begin_cb β€” the callback to be called upon the start of a transfer
  • marker_cb β€” the callback to be called with every restart marker received
  • complete_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 πŸ’‹βœ¨