earthly-sdk
Earthly runtime for Dagger. 🚀
Installation
dagger install github.com/wingyplus/dagger-earthly-sdk@abc9799923a6d5cc8524a82e9c596dd64fcc7267
Entrypoint
Return Type
EarthlySdk !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
sdkSourceDir | Directory | - | No description provided |
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@abc9799923a6d5cc8524a82e9c596dd64fcc7267 call \
func (m *MyModule) Example() *dagger.EarthlySdk {
return dag.
EarthlySdk()
}
@function
def example() -> dagger.EarthlySdk:
return (
dag.earthly_sdk()
)
@func()
example(): EarthlySdk {
return dag
.earthlySdk()
}
Types
EarthlySdk 🔗
runtimeSourceDir() 🔗
Return Type
Directory !
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@abc9799923a6d5cc8524a82e9c596dd64fcc7267 call \
runtime-source-dir
func (m *MyModule) Example() *dagger.Directory {
return dag.
EarthlySdk().
RuntimeSourceDir()
}
@function
def example() -> dagger.Directory:
return (
dag.earthly_sdk()
.runtime_source_dir()
)
@func()
example(): Directory {
return dag
.earthlySdk()
.runtimeSourceDir()
}
moduleRuntime() 🔗
ModuleRuntime implements runtime api.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
modSource | ModuleSource ! | - | No description provided |
introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.Container {
return dag.
EarthlySdk().
ModuleRuntime(modSource, introspectionJson)
}
@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.Container:
return (
dag.earthly_sdk()
.module_runtime(mod_source, introspection_json)
)
@func()
example(modSource: ModuleSource, introspectionJson: File): Container {
return dag
.earthlySdk()
.moduleRuntime(modSource, introspectionJson)
}
codegen() 🔗
Codegen implements runtime api.
Return Type
GeneratedCode !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
modSource | ModuleSource ! | - | No description provided |
introspectionJson | File ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(modSource *dagger.ModuleSource, introspectionJson *dagger.File) *dagger.GeneratedCode {
return dag.
EarthlySdk().
Codegen(modSource, introspectionJson)
}
@function
def example(mod_source: dagger.ModuleSource, introspection_json: dagger.File) -> dagger.GeneratedCode:
return (
dag.earthly_sdk()
.codegen(mod_source, introspection_json)
)
@func()
example(modSource: ModuleSource, introspectionJson: File): GeneratedCode {
return dag
.earthlySdk()
.codegen(modSource, introspectionJson)
}
runtime() 🔗
Runtime create a runtime binary for running the a function.
Return Type
File !
Example
dagger -m github.com/wingyplus/dagger-earthly-sdk@abc9799923a6d5cc8524a82e9c596dd64fcc7267 call \
runtime
func (m *MyModule) Example() *dagger.File {
return dag.
EarthlySdk().
Runtime()
}
@function
def example() -> dagger.File:
return (
dag.earthly_sdk()
.runtime()
)
@func()
example(): File {
return dag
.earthlySdk()
.runtime()
}
hello() 🔗
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
sock | Socket ! | - | No description provided |
Example
echo 'Custom types are not supported in shell examples'
func (m *MyModule) Example(ctx context.Context, sock *dagger.Socket) {
return dag.
EarthlySdk().
Hello(ctx, sock)
}
@function
async def example(sock: dagger.Socket) -> None:
return await (
dag.earthly_sdk()
.hello(sock)
)
@func()
async example(sock: Socket): Promise<void> {
return dag
.earthlySdk()
.hello(sock)
}