Struct taskcluster::PurgeCache

source ·
pub struct PurgeCache {
    pub client: Client,
}
Expand description

Purge Cache Service

The purge-cache service is responsible for tracking cache-purge requests.

User create purge requests for specific caches on specific workers, and these requests are timestamped. Workers consult the service before starting a new task, and purge any caches older than the timestamp.

Fields§

§client: Client

The underlying client used to make API calls for this service.

Implementations§

source§

impl PurgeCache

source

pub fn new<CB: Into<ClientBuilder>>(client_builder: CB) -> Result<Self, Error>

Create a new PurgeCache instance, based on the given client builder

source

pub async fn ping(&self) -> Result<(), Error>

Ping Server

Respond without doing anything. This endpoint is used to check that the service is up.

source

pub fn ping_url(&self) -> Result<String, Error>

Generate an unsigned URL for the ping endpoint

source

pub fn ping_signed_url(&self, ttl: Duration) -> Result<String, Error>

Generate a signed URL for the ping endpoint

source

pub async fn lbheartbeat(&self) -> Result<(), Error>

Load Balancer Heartbeat

Respond without doing anything. This endpoint is used to check that the service is up.

source

pub fn lbheartbeat_url(&self) -> Result<String, Error>

Generate an unsigned URL for the lbheartbeat endpoint

source

pub fn lbheartbeat_signed_url(&self, ttl: Duration) -> Result<String, Error>

Generate a signed URL for the lbheartbeat endpoint

source

pub async fn version(&self) -> Result<(), Error>

Taskcluster Version

Respond with the JSON version object. https://github.com/mozilla-services/Dockerflow/blob/main/docs/version_object.md

source

pub fn version_url(&self) -> Result<String, Error>

Generate an unsigned URL for the version endpoint

source

pub fn version_signed_url(&self, ttl: Duration) -> Result<String, Error>

Generate a signed URL for the version endpoint

source

pub async fn purgeCache( &self, workerPoolId: &str, payload: &Value ) -> Result<(), Error>

Purge Worker Cache

Publish a request to purge caches named cacheName with on workerPoolId workers.

If such a request already exists, its before timestamp is updated to the current time.

source

pub async fn allPurgeRequests( &self, continuationToken: Option<&str>, limit: Option<&str> ) -> Result<Value, Error>

All Open Purge Requests

View all active purge requests.

This is useful mostly for administors to view the set of open purge requests. It should not be used by workers. They should use the purgeRequests endpoint that is specific to their workerType and provisionerId.

source

pub fn allPurgeRequests_url( &self, continuationToken: Option<&str>, limit: Option<&str> ) -> Result<String, Error>

Generate an unsigned URL for the allPurgeRequests endpoint

source

pub fn allPurgeRequests_signed_url( &self, continuationToken: Option<&str>, limit: Option<&str>, ttl: Duration ) -> Result<String, Error>

Generate a signed URL for the allPurgeRequests endpoint

source

pub async fn purgeRequests( &self, workerPoolId: &str, since: Option<&str> ) -> Result<Value, Error>

Open Purge Requests for a worker pool

List the caches for this workerPoolId that should to be purged if they are from before the time given in the response.

This is intended to be used by workers to determine which caches to purge.

source

pub fn purgeRequests_url( &self, workerPoolId: &str, since: Option<&str> ) -> Result<String, Error>

Generate an unsigned URL for the purgeRequests endpoint

source

pub fn purgeRequests_signed_url( &self, workerPoolId: &str, since: Option<&str>, ttl: Duration ) -> Result<String, Error>

Generate a signed URL for the purgeRequests endpoint

source

pub async fn heartbeat(&self) -> Result<(), Error>

Heartbeat

Respond with a service heartbeat.

This endpoint is used to check on backing services this service depends on.

source

pub fn heartbeat_url(&self) -> Result<String, Error>

Generate an unsigned URL for the heartbeat endpoint

source

pub fn heartbeat_signed_url(&self, ttl: Duration) -> Result<String, Error>

Generate a signed URL for the heartbeat endpoint

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more