Back to Dagger

Service

docs/static/reference/php/Dagger/Service.html

0.20.74.9 KB
Original Source

Service

class Service extends AbstractObject implements IdAble

A content-addressed service providing TCP connectivity.

Properties

| | $lastQuery | | from AbstractObject |

Methods

__construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

from AbstractObject

null|array|string|int|float|bool

queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

from AbstractObject

string

endpoint(int|null $port = null, string|null $scheme = '')

Retrieves an endpoint that clients can use to reach this container.

string

hostname()

Retrieves a hostname which can be used by clients to reach this container.

AbstractId

id()

A unique identifier for this Service.

array

ports()

Retrieves the list of ports provided by the service.

ServiceId

start()

Start the service and wait for its health checks to succeed.

ServiceId

stop(bool|null $kill = false)

Stop the service.

ServiceId

sync()

Forces evaluation of the pipeline in the engine.

Service

terminal(array|null $cmd = null)

No description

void

up(array|null $ports = null, bool|null $random = false)

Creates a tunnel that forwards traffic from the caller's network to this service.

Service

withHostname(string $hostname)

Configures a hostname which can be used by clients within the session to reach this container.

Details

in AbstractObject at line 13 __construct(AbstractClient $client, QueryBuilderChain $queryBuilderChain)

No description

Parameters

| AbstractClient | $client | | | QueryBuilderChain | $queryBuilderChain | |

in AbstractObject at line 19 protected null|array|string|int|float|bool queryLeaf(QueryBuilder $leafQueryBuilder, string $leafKey)

No description

Parameters

| QueryBuilder | $leafQueryBuilder | | | string | $leafKey | |

Return Value

| null|array|string|int|float|bool | |

at line 23 string endpoint(int|null $port = null, string|null $scheme = '')

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.

Parameters

| int|null | $port | | | string|null | $scheme | |

Return Value

| string | |

at line 38 string hostname()

Retrieves a hostname which can be used by clients to reach this container.

Return Value

| string | |

at line 47 AbstractId id()

A unique identifier for this Service.

Return Value

| AbstractId | |

at line 56 array ports()

Retrieves the list of ports provided by the service.

Return Value

| array | |

at line 67 ServiceId start()

Start the service and wait for its health checks to succeed.

Services bound to a Container do not need to be manually started.

Return Value

| ServiceId | |

at line 76 ServiceId stop(bool|null $kill = false)

Stop the service.

Parameters

| bool|null | $kill | |

Return Value

| ServiceId | |

at line 88 ServiceId sync()

Forces evaluation of the pipeline in the engine.

Return Value

| ServiceId | |

at line 94 Service terminal(array|null $cmd = null)

No description

Parameters

| array|null | $cmd | |

Return Value

| Service | |

at line 106 void up(array|null $ports = null, bool|null $random = false)

Creates a tunnel that forwards traffic from the caller's network to this service.

Parameters

| array|null | $ports | | | bool|null | $random | |

Return Value

| void | |

at line 121 Service withHostname(string $hostname)

Configures a hostname which can be used by clients within the session to reach this container.

Parameters

| string | $hostname | |

Return Value

| Service | |

Generated by Doctum, a API Documentation generator and fork of Sami.