View Source Dagger.Service (dagger v0.10.3)
A content-addressed service providing TCP connectivity.
Link to this section Summary
Functions
Retrieves an endpoint that clients can use to reach this container.
Retrieves a hostname which can be used by clients to reach this container.
A unique identifier for this Service.
Retrieves the list of ports provided by the service.
Start the service and wait for its health checks to succeed.
Stop the service.
Creates a tunnel that forwards traffic from the caller's network to this service.
Link to this section Types
Link to this section Functions
@spec endpoint( t(), keyword() ) :: {:ok, Dagger.String.t()} | {:error, term()}
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.
optional-arguments
Optional Arguments
port
- The exposed port number for the endpointscheme
- Return a URL with the given scheme, eg. http for http://
@spec hostname(t()) :: {:ok, Dagger.String.t()} | {:error, term()}
Retrieves a hostname which can be used by clients to reach this container.
@spec id(t()) :: {:ok, Dagger.ServiceID.t()} | {:error, term()}
A unique identifier for this Service.
@spec ports(t()) :: {:ok, [Dagger.Port.t()]} | {:error, term()}
Retrieves the list of ports provided by the service.
@spec start(t()) :: {:ok, Dagger.ServiceID.t()} | {:error, term()}
Start the service and wait for its health checks to succeed.
Services bound to a Container do not need to be manually started.
@spec stop( t(), keyword() ) :: {:ok, Dagger.ServiceID.t()} | {:error, term()}
Stop the service.
optional-arguments
Optional Arguments
kill
- Immediately kill the service without waiting for a graceful exit
@spec up( t(), keyword() ) :: {:ok, Dagger.Void.t() | nil} | {:error, term()}
Creates a tunnel that forwards traffic from the caller's network to this service.
optional-arguments
Optional Arguments
ports
- List of frontend/backend port mappings to forward.
Frontend is the port accepting traffic on the host, backend is the service port.
random
- Bind each tunnel port to a random port on the host.