pub struct Configuration {
pub server_api_url: String,
pub ui_host: String,
pub auth_key: Option<String>,
pub auth_secret: Option<String>,
pub auth_token: Option<String>,
pub token_update_time: Option<Instant>,
pub auth_token_ttl: Duration,
pub auth_disabled: bool,
pub timeout: Duration,
pub connect_timeout: Duration,
pub debug: bool,
}Expand description
Main configuration for Conductor client.
Fields§
§server_api_url: StringConductor server API URL (e.g., “http://localhost:8080/api”).
ui_host: StringUI host URL for viewing executions.
auth_key: Option<String>Authentication key (optional).
auth_secret: Option<String>Authentication secret (optional).
auth_token: Option<String>Current authentication token (managed internally).
token_update_time: Option<Instant>Time when the token was last updated.
auth_token_ttl: DurationToken time-to-live duration (default: 45 minutes).
auth_disabled: boolWhether authentication is disabled (e.g., OSS Conductor without auth).
timeout: DurationRequest timeout.
connect_timeout: DurationConnection timeout.
debug: boolEnable debug logging.
Implementations§
Source§impl Configuration
impl Configuration
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create configuration from environment variables.
Environment variables:
CONDUCTOR_SERVER_URL: Conductor server API URL (default: http://localhost:8080/api)CONDUCTOR_AUTH_KEY: Authentication key ID for Orkes ConductorCONDUCTOR_AUTH_SECRET: Authentication secret for Orkes ConductorCONDUCTOR_DEBUG: Enable debug mode (true/false)CONDUCTOR_TIMEOUT_SECS: Request timeout in seconds (default: 30)CONDUCTOR_AUTH_TOKEN_TTL_MINS: Token TTL in minutes (default: 45)
The SDK automatically handles token refresh when using Orkes Conductor. For open-source Conductor without authentication, simply omit the auth variables.
Sourcepub fn new(server_api_url: impl Into<String>) -> Self
pub fn new(server_api_url: impl Into<String>) -> Self
Create a new configuration with custom settings.
Sourcepub fn with_auth(
self,
key: impl Into<String>,
secret: impl Into<String>,
) -> Self
pub fn with_auth( self, key: impl Into<String>, secret: impl Into<String>, ) -> Self
Set authentication credentials.
Sourcepub fn with_token_ttl(self, ttl: Duration) -> Self
pub fn with_token_ttl(self, ttl: Duration) -> Self
Set token TTL (time-to-live) duration.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout.
Sourcepub fn with_debug(self, debug: bool) -> Self
pub fn with_debug(self, debug: bool) -> Self
Enable debug mode.
Sourcepub fn update_token(&mut self, token: String)
pub fn update_token(&mut self, token: String)
Update the authentication token.
Sourcepub fn clear_token(&mut self)
pub fn clear_token(&mut self)
Clear the authentication token (e.g., after auth failure).
Sourcepub fn disable_auth(&mut self)
pub fn disable_auth(&mut self)
Disable authentication (e.g., when server doesn’t require it).
Sourcepub fn token_needs_refresh(&self) -> bool
pub fn token_needs_refresh(&self) -> bool
Check if the token needs to be refreshed based on TTL.
Sourcepub fn execution_url(&self, workflow_id: &str) -> String
pub fn execution_url(&self, workflow_id: &str) -> String
Get the execution URL for a workflow.