pdk-contracts-lib 1.10.0

PDK Contracts Library
Documentation
// Copyright (c) 2026, Salesforce, Inc.,
// All rights reserved.
// For full license text, see the LICENSE.txt file

use std::time::Duration;

pub const CONTRACTS_FETCHING_INTERVAL: Duration = Duration::from_secs(15);
pub const PLATFORM_TIMEOUT_DURATION: Duration = Duration::from_secs(10);
pub const LOCK_TIMEOUT_DURATION: Duration = Duration::from_secs(15);

/// Default poll backoff applied after a failed contracts poll. Used for every failure except a
/// `429` that carries a parseable `Retry-After` header (which supplies its own dynamic length).
pub const RETRY_GUARD_DEFAULT_BACKOFF: Duration = CONTRACTS_FETCHING_INTERVAL;
/// Upper bound honored for a `Retry-After` header value.
pub const RETRY_GUARD_MAX_BACKOFF: Duration = Duration::from_secs(5 * 60);

pub const PRIMARY_INACTIVE_TIMEOUT: Duration = Duration::from_secs(180);
pub const PRIMARY_BACKUP_INTERVAL: Duration = Duration::from_secs(60);
pub const CONTRACTS_CACHE_EXPIRATION: u32 = 2592000000;
pub const ACCEPT_HASH_ALGORITHM_VALUE: &str = "sha256";