class Client extends AbstractClient

The root of the DAG.

Properties

protected AbstractClient $client from  AbstractClient
protected Client $graphQlClient from  AbstractClient

Methods

__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())

No description

Results
runQuery(Query $query)

No description

null|array|string|int|float|bool
queryLeaf(Query $query, string $leafKey)

No description

cacheVolume(string $key)

Constructs a cache volume for a given cache key.

cloud()

Dagger Cloud configuration and state

container(Platform|null $platform = null)

Creates a scratch container, with no image or metadata.

currentFunctionCall()

The FunctionCall context that the SDK caller is currently executing in.

currentModule()

The module currently being served in the session, if any.

array
currentTypeDefs()

The TypeDef representations of the objects currently being served in the session.

defaultPlatform()

The default platform of the engine.

directory()

Creates an empty directory.

engine()

The Dagger engine container configuration and state

Env
env(bool|null $privileged = false, bool|null $writable = false)

Initialize a new environment

error(string $message)

Create a new error.

file(string $name, string $contents, int|null $permissions = 420)

Creates a file with the specified contents.

function(string $name, TypeDef $returnType)

Creates a function.

generatedCode(Directory $code)

Create a code generation result, given a directory containing the generated code.

git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)

Queries a Git repository.

host()

Queries the host environment.

http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

LLM
llm(string|null $model = null, int|null $maxAPICalls = null)

Initialize a Large Language Model (LLM)

loadBindingFromID(Binding $id)

Load a Binding from its ID.

loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume from its ID.

loadCloudFromID(Cloud $id)

Load a Cloud from its ID.

loadContainerFromID(Container $id)

Load a Container from its ID.

loadCurrentModuleFromID(CurrentModule $id)

Load a CurrentModule from its ID.

loadDirectoryFromID(Directory $id)

Load a Directory from its ID.

loadEngineCacheEntryFromID(EngineCacheEntry $id)

Load a EngineCacheEntry from its ID.

loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)

Load a EngineCacheEntrySet from its ID.

loadEngineCacheFromID(EngineCache $id)

Load a EngineCache from its ID.

loadEngineFromID(Engine $id)

Load a Engine from its ID.

loadEnumTypeDefFromID(EnumTypeDef $id)

Load a EnumTypeDef from its ID.

loadEnumValueTypeDefFromID(EnumValueTypeDef $id)

Load a EnumValueTypeDef from its ID.

Env
loadEnvFromID(Env $id)

Load a Env from its ID.

loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

loadErrorFromID(Error $id)

Load a Error from its ID.

loadErrorValueFromID(ErrorValue $id)

Load a ErrorValue from its ID.

loadFieldTypeDefFromID(FieldTypeDef $id)

Load a FieldTypeDef from its ID.

loadFileFromID(File $id)

Load a File from its ID.

loadFunctionArgFromID(FunctionArg $id)

Load a FunctionArg from its ID.

loadFunctionCallArgValueFromID(FunctionCallArgValue $id)

Load a FunctionCallArgValue from its ID.

loadFunctionCallFromID(FunctionCall $id)

Load a FunctionCall from its ID.

loadFunctionFromID(Function_ $id)

Load a Function from its ID.

loadGeneratedCodeFromID(GeneratedCode $id)

Load a GeneratedCode from its ID.

loadGitRefFromID(GitRef $id)

Load a GitRef from its ID.

loadGitRepositoryFromID(GitRepository $id)

Load a GitRepository from its ID.

loadHostFromID(Host $id)

Load a Host from its ID.

loadInputTypeDefFromID(InputTypeDef $id)

Load a InputTypeDef from its ID.

loadInterfaceTypeDefFromID(InterfaceTypeDef $id)

Load a InterfaceTypeDef from its ID.

LLM
loadLLMFromID(LLM $id)

Load a LLM from its ID.

loadLLMTokenUsageFromID(LLMTokenUsage $id)

Load a LLMTokenUsage from its ID.

loadLabelFromID(Label $id)

Load a Label from its ID.

loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef from its ID.

loadModuleConfigClientFromID(ModuleConfigClient $id)

Load a ModuleConfigClient from its ID.

loadModuleFromID(Module $id)

Load a Module from its ID.

loadModuleSourceFromID(ModuleSource $id)

Load a ModuleSource from its ID.

loadObjectTypeDefFromID(ObjectTypeDef $id)

Load a ObjectTypeDef from its ID.

loadPortFromID(Port $id)

Load a Port from its ID.

loadSDKConfigFromID(SDKConfig $id)

Load a SDKConfig from its ID.

loadScalarTypeDefFromID(ScalarTypeDef $id)

Load a ScalarTypeDef from its ID.

loadSecretFromID(Secret $id)

Load a Secret from its ID.

loadServiceFromID(Service $id)

Load a Service from its ID.

loadSocketFromID(Socket $id)

Load a Socket from its ID.

loadSourceMapFromID(SourceMap $id)

Load a SourceMap from its ID.

loadTerminalFromID(Terminal $id)

Load a Terminal from its ID.

loadTypeDefFromID(TypeDef $id)

Load a TypeDef from its ID.

module()

Create a new module.

moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)

Create a new module source instance from a source ref string

secret(string $uri, string|null $cacheKey = null)

Creates a new secret.

setSecret(string $name, string $plaintext)

Sets a secret given a user defined name to its plaintext and returns the secret.

sourceMap(string $filename, int $line, int $column)

Creates source map metadata.

typeDef()

Create a new TypeDef.

string
version()

Get the current Dagger Engine version.

Details

in AbstractClient at line 20
__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())

No description

Parameters

Client $clientOrConnection
QueryBuilderChain $queryBuilderChain

in AbstractClient at line 33
Results runQuery(Query $query)

No description

Parameters

Query $query

Return Value

Results

in AbstractClient at line 38
null|array|string|int|float|bool queryLeaf(Query $query, string $leafKey)

No description

Parameters

Query $query
string $leafKey

Return Value

null|array|string|int|float|bool

at line 19
CacheVolume cacheVolume(string $key)

Constructs a cache volume for a given cache key.

Parameters

string $key

Return Value

CacheVolume

at line 29
Cloud cloud()

Dagger Cloud configuration and state

Return Value

Cloud

at line 40
Container container(Platform|null $platform = null)

Creates a scratch container, with no image or metadata.

To pull an image, follow up with the "from" function.

Parameters

Platform|null $platform

Return Value

Container

at line 54
FunctionCall currentFunctionCall()

The FunctionCall context that the SDK caller is currently executing in.

If the caller is not currently executing in a function, this will return an error.

Return Value

FunctionCall

at line 63
CurrentModule currentModule()

The module currently being served in the session, if any.

Return Value

CurrentModule

at line 72
array currentTypeDefs()

The TypeDef representations of the objects currently being served in the session.

Return Value

array

at line 81
Platform defaultPlatform()

The default platform of the engine.

Return Value

Platform

at line 90
Directory directory()

Creates an empty directory.

Return Value

Directory

at line 99
Engine engine()

The Dagger engine container configuration and state

Return Value

Engine

at line 108
Env env(bool|null $privileged = false, bool|null $writable = false)

Initialize a new environment

Parameters

bool|null $privileged
bool|null $writable

Return Value

Env

at line 123
Error error(string $message)

Create a new error.

Parameters

string $message

Return Value

Error

at line 133
File file(string $name, string $contents, int|null $permissions = 420)

Creates a file with the specified contents.

Parameters

string $name
string $contents
int|null $permissions

Return Value

File

at line 147
Function_ function(string $name, TypeDef $returnType)

Creates a function.

Parameters

string $name
TypeDef $returnType

Return Value

Function_

at line 158
GeneratedCode generatedCode(Directory $code)

Create a code generation result, given a directory containing the generated code.

Parameters

Directory $code

Return Value

GeneratedCode

at line 168
GitRepository git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)

Queries a Git repository.

Parameters

string $url
bool|null $keepGitDir
string|null $sshKnownHosts
Socket|null $sshAuthSocket
string|null $httpAuthUsername
Secret|null $httpAuthToken
Secret|null $httpAuthHeader
Service|null $experimentalServiceHost

Return Value

GitRepository

at line 207
Host host()

Queries the host environment.

Return Value

Host

at line 216
File http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

Parameters

string $url
string|null $name
int|null $permissions
Secret|null $authHeader
Service|null $experimentalServiceHost

Return Value

File

at line 243
LLM llm(string|null $model = null, int|null $maxAPICalls = null)

Initialize a Large Language Model (LLM)

Parameters

string|null $model
int|null $maxAPICalls

Return Value

LLM

at line 258
Binding loadBindingFromID(Binding $id)

Load a Binding from its ID.

Parameters

Binding $id

Return Value

Binding

at line 268
CacheVolume loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume from its ID.

Parameters

CacheVolume $id

Return Value

CacheVolume

at line 278
Cloud loadCloudFromID(Cloud $id)

Load a Cloud from its ID.

Parameters

Cloud $id

Return Value

Cloud

at line 288
Container loadContainerFromID(Container $id)

Load a Container from its ID.

Parameters

Container $id

Return Value

Container

at line 298
CurrentModule loadCurrentModuleFromID(CurrentModule $id)

Load a CurrentModule from its ID.

Parameters

CurrentModule $id

Return Value

CurrentModule

at line 308
Directory loadDirectoryFromID(Directory $id)

Load a Directory from its ID.

Parameters

Directory $id

Return Value

Directory

at line 318
EngineCacheEntry loadEngineCacheEntryFromID(EngineCacheEntry $id)

Load a EngineCacheEntry from its ID.

Parameters

EngineCacheEntry $id

Return Value

EngineCacheEntry

at line 328
EngineCacheEntrySet loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)

Load a EngineCacheEntrySet from its ID.

Parameters

EngineCacheEntrySet $id

Return Value

EngineCacheEntrySet

at line 338
EngineCache loadEngineCacheFromID(EngineCache $id)

Load a EngineCache from its ID.

Parameters

EngineCache $id

Return Value

EngineCache

at line 348
Engine loadEngineFromID(Engine $id)

Load a Engine from its ID.

Parameters

Engine $id

Return Value

Engine

at line 358
EnumTypeDef loadEnumTypeDefFromID(EnumTypeDef $id)

Load a EnumTypeDef from its ID.

Parameters

EnumTypeDef $id

Return Value

EnumTypeDef

at line 368
EnumValueTypeDef loadEnumValueTypeDefFromID(EnumValueTypeDef $id)

Load a EnumValueTypeDef from its ID.

Parameters

EnumValueTypeDef $id

Return Value

EnumValueTypeDef

at line 378
Env loadEnvFromID(Env $id)

Load a Env from its ID.

Parameters

Env $id

Return Value

Env

at line 388
EnvVariable loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

Parameters

EnvVariable $id

Return Value

EnvVariable

at line 398
Error loadErrorFromID(Error $id)

Load a Error from its ID.

Parameters

Error $id

Return Value

Error

at line 408
ErrorValue loadErrorValueFromID(ErrorValue $id)

Load a ErrorValue from its ID.

Parameters

ErrorValue $id

Return Value

ErrorValue

at line 418
FieldTypeDef loadFieldTypeDefFromID(FieldTypeDef $id)

Load a FieldTypeDef from its ID.

Parameters

FieldTypeDef $id

Return Value

FieldTypeDef

at line 428
File loadFileFromID(File $id)

Load a File from its ID.

Parameters

File $id

Return Value

File

at line 438
FunctionArg loadFunctionArgFromID(FunctionArg $id)

Load a FunctionArg from its ID.

Parameters

FunctionArg $id

Return Value

FunctionArg

at line 448
FunctionCallArgValue loadFunctionCallArgValueFromID(FunctionCallArgValue $id)

Load a FunctionCallArgValue from its ID.

Parameters

FunctionCallArgValue $id

Return Value

FunctionCallArgValue

at line 459
FunctionCall loadFunctionCallFromID(FunctionCall $id)

Load a FunctionCall from its ID.

Parameters

FunctionCall $id

Return Value

FunctionCall

at line 469
Function_ loadFunctionFromID(Function_ $id)

Load a Function from its ID.

Parameters

Function_ $id

Return Value

Function_

at line 479
GeneratedCode loadGeneratedCodeFromID(GeneratedCode $id)

Load a GeneratedCode from its ID.

Parameters

GeneratedCode $id

Return Value

GeneratedCode

at line 489
GitRef loadGitRefFromID(GitRef $id)

Load a GitRef from its ID.

Parameters

GitRef $id

Return Value

GitRef

at line 499
GitRepository loadGitRepositoryFromID(GitRepository $id)

Load a GitRepository from its ID.

Parameters

GitRepository $id

Return Value

GitRepository

at line 509
Host loadHostFromID(Host $id)

Load a Host from its ID.

Parameters

Host $id

Return Value

Host

at line 519
InputTypeDef loadInputTypeDefFromID(InputTypeDef $id)

Load a InputTypeDef from its ID.

Parameters

InputTypeDef $id

Return Value

InputTypeDef

at line 529
InterfaceTypeDef loadInterfaceTypeDefFromID(InterfaceTypeDef $id)

Load a InterfaceTypeDef from its ID.

Parameters

InterfaceTypeDef $id

Return Value

InterfaceTypeDef

at line 539
LLM loadLLMFromID(LLM $id)

Load a LLM from its ID.

Parameters

LLM $id

Return Value

LLM

at line 549
LLMTokenUsage loadLLMTokenUsageFromID(LLMTokenUsage $id)

Load a LLMTokenUsage from its ID.

Parameters

LLMTokenUsage $id

Return Value

LLMTokenUsage

at line 559
Label loadLabelFromID(Label $id)

Load a Label from its ID.

Parameters

Label $id

Return Value

Label

at line 569
ListTypeDef loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef from its ID.

Parameters

ListTypeDef $id

Return Value

ListTypeDef

at line 579
ModuleConfigClient loadModuleConfigClientFromID(ModuleConfigClient $id)

Load a ModuleConfigClient from its ID.

Parameters

ModuleConfigClient $id

Return Value

ModuleConfigClient

at line 589
Module loadModuleFromID(Module $id)

Load a Module from its ID.

Parameters

Module $id

Return Value

Module

at line 599
ModuleSource loadModuleSourceFromID(ModuleSource $id)

Load a ModuleSource from its ID.

Parameters

ModuleSource $id

Return Value

ModuleSource

at line 609
ObjectTypeDef loadObjectTypeDefFromID(ObjectTypeDef $id)

Load a ObjectTypeDef from its ID.

Parameters

ObjectTypeDef $id

Return Value

ObjectTypeDef

at line 619
Port loadPortFromID(Port $id)

Load a Port from its ID.

Parameters

Port $id

Return Value

Port

at line 629
SDKConfig loadSDKConfigFromID(SDKConfig $id)

Load a SDKConfig from its ID.

Parameters

SDKConfig $id

Return Value

SDKConfig

at line 639
ScalarTypeDef loadScalarTypeDefFromID(ScalarTypeDef $id)

Load a ScalarTypeDef from its ID.

Parameters

ScalarTypeDef $id

Return Value

ScalarTypeDef

at line 649
Secret loadSecretFromID(Secret $id)

Load a Secret from its ID.

Parameters

Secret $id

Return Value

Secret

at line 659
Service loadServiceFromID(Service $id)

Load a Service from its ID.

Parameters

Service $id

Return Value

Service

at line 669
Socket loadSocketFromID(Socket $id)

Load a Socket from its ID.

Parameters

Socket $id

Return Value

Socket

at line 679
SourceMap loadSourceMapFromID(SourceMap $id)

Load a SourceMap from its ID.

Parameters

SourceMap $id

Return Value

SourceMap

at line 689
Terminal loadTerminalFromID(Terminal $id)

Load a Terminal from its ID.

Parameters

Terminal $id

Return Value

Terminal

at line 699
TypeDef loadTypeDefFromID(TypeDef $id)

Load a TypeDef from its ID.

Parameters

TypeDef $id

Return Value

TypeDef

at line 709
Module module()

Create a new module.

Return Value

Module

at line 718
ModuleSource moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)

Create a new module source instance from a source ref string

Parameters

string $refString
string|null $refPin
bool|null $disableFindUp
bool|null $allowNotExists
ModuleSourceKind|null $requireKind

Return Value

ModuleSource

at line 745
Secret secret(string $uri, string|null $cacheKey = null)

Creates a new secret.

Parameters

string $uri
string|null $cacheKey

Return Value

Secret

at line 760
Secret setSecret(string $name, string $plaintext)

Sets a secret given a user defined name to its plaintext and returns the secret.

The plaintext value is limited to a size of 128000 bytes.

Parameters

string $name
string $plaintext

Return Value

Secret

at line 771
SourceMap sourceMap(string $filename, int $line, int $column)

Creates source map metadata.

Parameters

string $filename
int $line
int $column

Return Value

SourceMap

at line 783
TypeDef typeDef()

Create a new TypeDef.

Return Value

TypeDef

at line 792
string version()

Get the current Dagger Engine version.

Return Value

string