View Source Dagger.CurrentModule (dagger v0.9.11)

Reflective module API provided to functions at runtime.

Link to this section Summary

Functions

A unique identifier for this CurrentModule.

The name of the module being executed in

The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).

Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.

Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.

Link to this section Types

@type t() :: %Dagger.CurrentModule{client: term(), selection: term()}

Link to this section Functions

@spec id(t()) :: {:ok, Dagger.CurrentModuleID.t()} | {:error, term()}

A unique identifier for this CurrentModule.

@spec name(t()) :: {:ok, Dagger.String.t()} | {:error, term()}

The name of the module being executed in

@spec source(t()) :: Dagger.Directory.t()

The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).

Link to this function

workdir(current_module, path, optional_args \\ [])

View Source
@spec workdir(t(), Dagger.String.t(), keyword()) :: Dagger.Directory.t()

Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.

required-arguments

Required Arguments

  • path - Location of the directory to access (e.g., ".").

optional-arguments

Optional Arguments

  • exclude - Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
  • include - Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
Link to this function

workdir_file(current_module, path)

View Source
@spec workdir_file(t(), Dagger.String.t()) :: Dagger.File.t()

Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.

required-arguments

Required Arguments

  • path - Location of the file to retrieve (e.g., "README.md").