Builder for a Sync Peer config `AranyaSyncPeerConfig`.
More...
#include <aranya-client.h>
|
(Note that these are not member symbols.)
|
| AranyaError | aranya_sync_peer_config_builder_init (struct AranyaSyncPeerConfigBuilder *out) |
| | Initializes AranyaSyncPeerConfigBuilder.
|
| |
| AranyaError | aranya_sync_peer_config_builder_cleanup (struct AranyaSyncPeerConfigBuilder *ptr) |
| | Releases any resources associated with ptr.
|
| |
| AranyaError | aranya_sync_peer_config_build (struct AranyaSyncPeerConfigBuilder *cfg, struct AranyaSyncPeerConfig *out) |
| | Attempts to build a `AranyaSyncPeerConfig`.
|
| |
| AranyaError | aranya_sync_peer_config_build_ext (struct AranyaSyncPeerConfigBuilder *cfg, struct AranyaSyncPeerConfig *out, struct AranyaExtError *__ext_err) |
| | Attempts to build a `AranyaSyncPeerConfig`.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_interval (struct AranyaSyncPeerConfigBuilder *cfg, AranyaDuration interval) |
| | Configures how often the peer will be synced with.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_interval_ext (struct AranyaSyncPeerConfigBuilder *cfg, AranyaDuration interval, struct AranyaExtError *__ext_err) |
| | Configures how often the peer will be synced with.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_now (struct AranyaSyncPeerConfigBuilder *cfg) |
| | Updates the config to enable immediate syncing with the peer.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_now_ext (struct AranyaSyncPeerConfigBuilder *cfg, struct AranyaExtError *__ext_err) |
| | Updates the config to enable immediate syncing with the peer.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_later (struct AranyaSyncPeerConfigBuilder *cfg) |
| | Updates the config to disable immediate syncing with the peer.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_later_ext (struct AranyaSyncPeerConfigBuilder *cfg, struct AranyaExtError *__ext_err) |
| | Updates the config to disable immediate syncing with the peer.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_on_hello (struct AranyaSyncPeerConfigBuilder *cfg, uint32_t sync_on_hello) |
| | Sets whether automatic syncing should occur when a hello message is received from this peer indicating they have a head that we don't have.
|
| |
| AranyaError | aranya_sync_peer_config_builder_set_sync_on_hello_ext (struct AranyaSyncPeerConfigBuilder *cfg, uint32_t sync_on_hello, struct AranyaExtError *__ext_err) |
| | Sets whether automatic syncing should occur when a hello message is received from this peer indicating they have a head that we don't have.
|
| |
Builder for a Sync Peer config `AranyaSyncPeerConfig`.
◆ aranya_sync_peer_config_build()
Attempts to build a `AranyaSyncPeerConfig`.
This function consumes and releases any resources associated with the memory pointed to by cfg.
- Parameters
-
| [in] | cfg | a pointer to the builder for a sync config |
| [out] | out | a pointer to write the sync config to |
◆ aranya_sync_peer_config_build_ext()
Attempts to build a `AranyaSyncPeerConfig`.
This function consumes and releases any resources associated with the memory pointed to by cfg.
- Parameters
-
| [in] | cfg | a pointer to the builder for a sync config |
| [out] | out | a pointer to write the sync config to |
◆ aranya_sync_peer_config_builder_cleanup()
◆ aranya_sync_peer_config_builder_init()
◆ aranya_sync_peer_config_builder_set_interval()
Configures how often the peer will be synced with.
By default, the interval is not set. It is an error to call `aranya_sync_peer_config_build` before setting the interval with this function
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
| [in] | interval | Set the interval at which syncing occurs (maximum 1 year) |
◆ aranya_sync_peer_config_builder_set_interval_ext()
Configures how often the peer will be synced with.
By default, the interval is not set. It is an error to call `aranya_sync_peer_config_build` before setting the interval with this function
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
| [in] | interval | Set the interval at which syncing occurs (maximum 1 year) |
◆ aranya_sync_peer_config_builder_set_sync_later()
Updates the config to disable immediate syncing with the peer.
Overrides `aranya_sync_peer_config_builder_set_sync_now` if invoked afterward.
By default, the peer is synced with immediately.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
◆ aranya_sync_peer_config_builder_set_sync_later_ext()
Updates the config to disable immediate syncing with the peer.
Overrides `aranya_sync_peer_config_builder_set_sync_now` if invoked afterward.
By default, the peer is synced with immediately.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
◆ aranya_sync_peer_config_builder_set_sync_now()
Updates the config to enable immediate syncing with the peer.
Overrides `aranya_sync_peer_config_builder_set_sync_later` if invoked afterward.
By default, the peer is synced with immediately.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
◆ aranya_sync_peer_config_builder_set_sync_now_ext()
Updates the config to enable immediate syncing with the peer.
Overrides `aranya_sync_peer_config_builder_set_sync_later` if invoked afterward.
By default, the peer is synced with immediately.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
◆ aranya_sync_peer_config_builder_set_sync_on_hello()
Sets whether automatic syncing should occur when a hello message is received from this peer indicating they have a head that we don't have.
By default, sync on hello is disabled.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
| [in] | sync_on_hello | whether to enable or disable sync on hello (0 = false, non-zero = true) |
◆ aranya_sync_peer_config_builder_set_sync_on_hello_ext()
Sets whether automatic syncing should occur when a hello message is received from this peer indicating they have a head that we don't have.
By default, sync on hello is disabled.
- Parameters
-
| [in,out] | cfg | a pointer to the builder for a sync config |
| [in] | sync_on_hello | whether to enable or disable sync on hello (0 = false, non-zero = true) |
The documentation for this struct was generated from the following file: