dagger/dsl/service
Types
pub type ForEndpoint
pub type ForTerminal
Values
pub fn endpoint(
parent: types.Service,
with with_fn: fn(Opts(ForEndpoint)) -> Opts(ForEndpoint),
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
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.
pub fn hostname(
parent: types.Service,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
Retrieves a hostname which can be used by clients to reach this container.
pub fn opt_cmd(
opts: Opts(ForTerminal),
val: List(String),
) -> Opts(ForTerminal)
pub fn opt_port(
opts: Opts(ForEndpoint),
val: Int,
) -> Opts(ForEndpoint)
pub fn opt_scheme(
opts: Opts(ForEndpoint),
val: String,
) -> Opts(ForEndpoint)
pub fn ports(
parent: types.Service,
select select: fn(types.Port) -> List(types.Field),
client client: types.Client,
then handler: fn(Result(List(types.Port), types.QueryError)) -> a,
) -> a
Retrieves the list of ports provided by the service.
pub fn service(id id: types.Service) -> types.Service
pub fn start(parent: types.Service) -> types.Service
Start the service and wait for its health checks to succeed. Services bound to a Container do not need to be manually started.
pub fn stop(
parent: types.Service,
with with_fn: fn(Opts(ForStop)) -> Opts(ForStop),
) -> types.Service
Stop the service.
pub fn sync(parent: types.Service) -> types.Service
Forces evaluation of the pipeline in the engine.
pub fn terminal(
parent: types.Service,
with with_fn: fn(Opts(ForTerminal)) -> Opts(ForTerminal),
) -> types.Service
pub fn up(
parent: types.Service,
with with_fn: fn(Opts(ForUp)) -> Opts(ForUp),
client client: types.Client,
then handler: fn(Result(Nil, types.QueryError)) -> a,
) -> a
Creates a tunnel that forwards traffic from the caller’s network to this service.
pub fn with_hostname(
parent: types.Service,
hostname hostname: String,
) -> types.Service
Configures a hostname which can be used by clients within the session to reach this container.