Struct dagger_sdk::Host
source · pub struct Host {
pub proc: Option<Arc<Child>>,
pub selection: Selection,
pub graphql_client: DynGraphQLClient,
}Fields§
§proc: Option<Arc<Child>>§selection: Selection§graphql_client: DynGraphQLClientImplementations§
source§impl Host
impl Host
sourcepub fn directory(&self, path: impl Into<String>) -> Directory
pub fn directory(&self, path: impl Into<String>) -> Directory
Accesses a directory on the host.
Arguments
path- Location of the directory to access (e.g., “.”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn directory_opts<'a>(
&self,
path: impl Into<String>,
opts: HostDirectoryOpts<'a>
) -> Directory
pub fn directory_opts<'a>( &self, path: impl Into<String>, opts: HostDirectoryOpts<'a> ) -> Directory
Accesses a directory on the host.
Arguments
path- Location of the directory to access (e.g., “.”).opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn service(&self, ports: Vec<PortForward>) -> Service
pub fn service(&self, ports: Vec<PortForward>) -> Service
Creates a service that forwards traffic to a specified address via the host.
Arguments
ports- Ports to expose via the service, forwarding through the host network.
If a port’s frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn service_opts<'a>(
&self,
ports: Vec<PortForward>,
opts: HostServiceOpts<'a>
) -> Service
pub fn service_opts<'a>( &self, ports: Vec<PortForward>, opts: HostServiceOpts<'a> ) -> Service
Creates a service that forwards traffic to a specified address via the host.
Arguments
ports- Ports to expose via the service, forwarding through the host network.
If a port’s frontend is unspecified or 0, it defaults to the same as the backend port.
An empty set of ports is not valid; an error will be returned.
opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn set_secret_file(
&self,
name: impl Into<String>,
path: impl Into<String>
) -> Secret
pub fn set_secret_file( &self, name: impl Into<String>, path: impl Into<String> ) -> Secret
Sets a secret given a user-defined name and the file path on the host, and returns the secret. The file is limited to a size of 512000 bytes.
Arguments
name- The user defined name for this secret.path- Location of the file to set as a secret.
sourcepub fn tunnel(&self, service: Service) -> Service
pub fn tunnel(&self, service: Service) -> Service
Creates a tunnel that forwards traffic from the host to a service.
Arguments
service- Service to send traffic from the tunnel.opt- optional argument, see inner type for documentation, use_opts to use
sourcepub fn tunnel_opts(&self, service: Service, opts: HostTunnelOpts) -> Service
pub fn tunnel_opts(&self, service: Service, opts: HostTunnelOpts) -> Service
Creates a tunnel that forwards traffic from the host to a service.
Arguments
service- Service to send traffic from the tunnel.opt- optional argument, see inner type for documentation, use_opts to use