pub(crate) struct AccessConnectorClient {
pub(crate) key_store: KeyStore<KeySlotIds>,
pub(crate) api_configurations: Arc<ApiConfigurations>,
}Expand description
Domain-typed wrapper around the generated PAM rotation API clients.
Fields§
§key_store: KeyStore<KeySlotIds>§api_configurations: Arc<ApiConfigurations>Implementations§
Source§impl AccessConnectorClient
impl AccessConnectorClient
Sourcepub(crate) async fn poll_jobs(&self) -> Result<Vec<JobRef>, ApiError>
pub(crate) async fn poll_jobs(&self) -> Result<Vec<JobRef>, ApiError>
Poll for claimable rotation jobs. A 404 maps to ApiError::NotEligible.
Sourcepub(crate) async fn claim(
&self,
job_id: Uuid,
) -> Result<Option<WorkSnapshot>, ApiError>
pub(crate) async fn claim( &self, job_id: Uuid, ) -> Result<Option<WorkSnapshot>, ApiError>
Attempt to claim a rotation job.
Ok(None) means another connector won the race (409). A 404 maps to
ApiError::NotEligible.
Sourcepub(crate) async fn get_cipher(
&self,
attempt_id: Uuid,
) -> Result<Cipher, ApiError>
pub(crate) async fn get_cipher( &self, attempt_id: Uuid, ) -> Result<Cipher, ApiError>
Fetch the encrypted cipher for an attempt. A 404 maps to ApiError::UnknownAttempt.
Sourcepub(crate) async fn put_cipher(
&self,
attempt_id: Uuid,
body: CipherRequestModel,
) -> Result<(), ApiError>
pub(crate) async fn put_cipher( &self, attempt_id: Uuid, body: CipherRequestModel, ) -> Result<(), ApiError>
Write the re-encrypted cipher back. lastKnownRevisionDate is the optimistic-concurrency
check; a 409 means revision drift or capability lost, a 404 an unknown attempt.
Sourcepub(crate) async fn report_success(
&self,
attempt_id: Uuid,
termination: SessionTerminationOutcome,
) -> Result<(), ApiError>
pub(crate) async fn report_success( &self, attempt_id: Uuid, termination: SessionTerminationOutcome, ) -> Result<(), ApiError>
Report a successful rotation attempt. A 409 or 404 is final: do not retry.
Sourcepub(crate) async fn report_failure(
&self,
attempt_id: Uuid,
code: RotationFailureCode,
detail: Option<SafeDetail>,
sync_state: RotationSyncState,
) -> Result<(), ApiError>
pub(crate) async fn report_failure( &self, attempt_id: Uuid, code: RotationFailureCode, detail: Option<SafeDetail>, sync_state: RotationSyncState, ) -> Result<(), ApiError>
Report a failed rotation attempt. A 409 or 404 is final, as in Self::report_success.
Trait Implementations§
Source§impl FromClient for AccessConnectorClient
impl FromClient for AccessConnectorClient
Source§fn from_client(client: &Client) -> Self
fn from_client(client: &Client) -> Self
Construct this type from a [
Client] reference.Auto Trait Implementations§
impl !RefUnwindSafe for AccessConnectorClient
impl !UnwindSafe for AccessConnectorClient
impl Freeze for AccessConnectorClient
impl Send for AccessConnectorClient
impl Sync for AccessConnectorClient
impl Unpin for AccessConnectorClient
impl UnsafeUnpin for AccessConnectorClient
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more