pub async fn perform_provider_auction(
        &self,
        provider_ref: &str,
        link_name: &str,
        constraints: HashMap<String, String>,
        timeout: Duration,
    ) -> Result<Vec<ProviderAuctionAck>> {
        let subject = broker::provider_auction_subject(&self.nsprefix);
        let bytes = serialize(ProviderAuctionRequest {
            provider_ref: provider_ref.to_string(),
            link_name: link_name.to_string(),
            constraints,
        })?;
        let sub = self.nc.request_multi(&subject, bytes).await?;
        let providers = SubscriptionStream::new(sub)
            .collect(timeout, "provider auction")
            .await;
        Ok(providers)
    }
/// Performs a provider auction within the lattice, publishing a set of constraints and the metadata for the provider
/// in question. This will always wait for the full period specified by _duration_, and then return the set of gathered
/// results. It is then up to the client to choose from among the "auction winners" and issue the appropriate command
/// to start a provider. Clients cannot assume that auctions will always return at least one result.
Performs a provider auction within the lattice, publishing a set of constraints and the metadata for the provider
in question. This will always wait for the full period specified by _duration_, and then return the set of gathered
results. It is then up to the client to choose from among the "auction winners" and issue the appropriate command
to start a provider. Clients cannot assume that auctions will always return at least one result.
Performs a provider auction within the lattice publishing a set of constraints and the metadata for the provider in question . This will always wait for the full period specified by _duration_ and then return the set of gathered results . It is then up to the client to choose from among the " auction winners " and issue the appropriate command to start a provider . Clients cannot assume that auctions will always return at least one result .
pub async fn perform_provider_auction(
        &self,
        provider_ref: &str,
        link_name: &str,
        constraints: HashMap<String, String>,
        timeout: Duration,
    ) -> Result<Vec<ProviderAuctionAck>> {
        let subject = broker::provider_auction_subject(&self.nsprefix);
        let bytes = serialize(ProviderAuctionRequest {
            provider_ref: provider_ref.to_string(),
            link_name: link_name.to_string(),
            constraints,
        })?;
        let sub = self.nc.request_multi(&subject, bytes).await?;
        let providers = SubscriptionStream::new(sub)
            .collect(timeout, "provider auction")
            .await;
        Ok(providers)
    }
pub async fn perform_provider_auction ( & self , provider_ref : & str , link_name : & str , constraints : HashMap < String , String > , timeout : Duration , ) -> Result < Vec < ProviderAuctionAck > > { let subject = broker :: provider_auction_subject ( & self . nsprefix ) ; let bytes = serialize ( ProviderAuctionRequest { provider_ref : provider_ref . to_string ( ) , link_name : link_name . to_string ( ) , constraints , } ) ? ; let sub = self . nc . request_multi ( & subject , bytes ) . await ? ; let providers = SubscriptionStream :: new ( sub ) . collect ( timeout , " " ) . await ; Ok ( providers ) }
Performs a provider auction within the lattice, publishing a set of constraints and the metadata for the provider
in question.
Performs a provider auction within the lattice publishing a set of constraints and the metadata for the provider in question .
&self
provider_ref
&str
link_name
&str
constraints
HashMap<String, String>
timeout
Duration
&self
provider_ref
&str
link_name
&str
constraints
HashMap<String, String>
timeout
Duration