Struct dagger_sdk::Service
source · pub struct Service {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl Service
impl Service
sourcepub async fn endpoint(&self) -> Result<String, DaggerError>
pub async fn endpoint(&self) -> Result<String, DaggerError>
Retrieves an endpoint that clients can use to reach this container. If no port is specified, the first exposed port is used. If none exist an error is returned. If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn endpoint_opts<'a>(
&self,
opts: ServiceEndpointOpts<'a>
) -> Result<String, DaggerError>
pub async fn endpoint_opts<'a>( &self, opts: ServiceEndpointOpts<'a> ) -> Result<String, DaggerError>
Retrieves an endpoint that clients can use to reach this container. If no port is specified, the first exposed port is used. If none exist an error is returned. If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.
Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn hostname(&self) -> Result<String, DaggerError>
pub async fn hostname(&self) -> Result<String, DaggerError>
Retrieves a hostname which can be used by clients to reach this container.
sourcepub async fn id(&self) -> Result<ServiceId, DaggerError>
pub async fn id(&self) -> Result<ServiceId, DaggerError>
A unique identifier for this service.
sourcepub async fn start(&self) -> Result<ServiceId, DaggerError>
pub async fn start(&self) -> Result<ServiceId, DaggerError>
Start the service and wait for its health checks to succeed. Services bound to a Container do not need to be manually started.
sourcepub async fn stop(&self) -> Result<ServiceId, DaggerError>
pub async fn stop(&self) -> Result<ServiceId, DaggerError>
Stop the service.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Service
impl !Send for Service
impl !Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
Blanket Implementations§
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