pub struct UsageAgentBuilder { /* private fields */ }Implementations§
Source§impl UsageAgentBuilder
impl UsageAgentBuilder
Sourcepub fn token(self, token: String) -> Self
pub fn token(self, token: String) -> Self
Your Registry Access Token with write permission.
Sourcepub fn endpoint(self, endpoint: String) -> Self
pub fn endpoint(self, endpoint: String) -> Self
For self-hosting, you can override /usage endpoint (defaults to https://app.graphql-hive.com/usage).
Sourcepub fn target_id(self, target_id: String) -> Self
pub fn target_id(self, target_id: String) -> Self
A target ID, this can either be a slug following the format “$organizationSlug/$projectSlug/$targetSlug” (e.g “the-guild/graphql-hive/staging”) or an UUID (e.g. “a0f4c605-6541-4350-8cfe-b31f21a4bf80”). To be used when the token is configured with an organization access token.
Sourcepub fn buffer_size(self, buffer_size: usize) -> Self
pub fn buffer_size(self, buffer_size: usize) -> Self
A maximum number of operations to hold in a buffer before sending to Hive Console Default: 1000
Sourcepub fn connect_timeout(self, connect_timeout: Duration) -> Self
pub fn connect_timeout(self, connect_timeout: Duration) -> Self
A timeout for only the connect phase of a request to Hive Console Default: 5 seconds
Sourcepub fn request_timeout(self, request_timeout: Duration) -> Self
pub fn request_timeout(self, request_timeout: Duration) -> Self
A timeout for the entire request to Hive Console Default: 15 seconds
Sourcepub fn accept_invalid_certs(self, accept_invalid_certs: bool) -> Self
pub fn accept_invalid_certs(self, accept_invalid_certs: bool) -> Self
Accepts invalid SSL certificates Default: false
Sourcepub fn flush_interval(self, flush_interval: Duration) -> Self
pub fn flush_interval(self, flush_interval: Duration) -> Self
Frequency of flushing the buffer to the server Default: 5 seconds
Sourcepub fn user_agent(self, user_agent: String) -> Self
pub fn user_agent(self, user_agent: String) -> Self
User-Agent header to be sent with each request
Sourcepub fn retry_policy(self, retry_policy: ExponentialBackoff) -> Self
pub fn retry_policy(self, retry_policy: ExponentialBackoff) -> Self
Retry policy for sending reports Default: ExponentialBackoff with max 3 retries
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Maximum number of retries for sending reports Default: ExponentialBackoff with max 3 retries