Struct dagger_sdk::Service
source · pub struct Service {
pub proc: Option<Arc<DaggerSessionProc>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<DaggerSessionProc>>§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.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn stop_opts(
&self,
opts: ServiceStopOpts,
) -> Result<ServiceId, DaggerError>
pub async fn stop_opts( &self, opts: ServiceStopOpts, ) -> Result<ServiceId, DaggerError>
Stop the service.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn up(&self) -> Result<Void, DaggerError>
pub async fn up(&self) -> Result<Void, DaggerError>
Creates a tunnel that forwards traffic from the caller’s network to this service.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError>
pub async fn up_opts(&self, opts: ServiceUpOpts) -> Result<Void, DaggerError>
Creates a tunnel that forwards traffic from the caller’s network to this service.
§Arguments
opt- optional argument, see inner type for documentation, use_opts to use
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Service
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)