Interface GoFunctionProps

All Superinterfaces:
EventInvokeConfigOptions, FunctionOptions,
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-31T18:44:12.749Z") @Stability(Experimental) public interface GoFunctionProps extends, FunctionOptions
(experimental) Properties for a GolangFunction.


 GoFunction.Builder.create(this, "handler")
  • Method Details

    • getEntry

      @Stability(Experimental) @NotNull String getEntry()
      (experimental) The path to the folder or file that contains the main application entry point files for the project.

      This accepts either a path to a directory or file.

      If a directory path is provided then it will assume there is a Go entry file (i.e. main.go) and will construct the build command using the directory path.

      For example, if you provide the entry as:

        entry: 'my-lambda-app/cmd/api'

      Then the go build command would be:

        `go build ./cmd/api`

      If a path to a file is provided then it will use the filepath in the build command.

      For example, if you provide the entry as:

        entry: 'my-lambda-app/cmd/api/main.go'

      Then the go build command would be:

        `go build ./cmd/api/main.go`
    • getBundling

      @Stability(Experimental) @Nullable default BundlingOptions getBundling()
      (experimental) Bundling options.

      Default: - use default bundling options

    • getModuleDir

      @Stability(Experimental) @Nullable default String getModuleDir()
      (experimental) Directory containing your go.mod file.

      This will accept either a directory path containing a go.mod file or a filepath to your go.mod file (i.e. path/to/go.mod).

      This will be used as the source of the volume mounted in the Docker container and will be the directory where it will run go build from.

      Default: - the path is found by walking up parent directories searching for a `go.mod` file from the location of `entry`

    • getRuntime

      @Stability(Experimental) @Nullable default Runtime getRuntime()
      (experimental) The runtime environment.

      Only runtimes of the Golang family and provided family are supported.

      Default: lambda.Runtime.PROVIDED_AL2

    • builder

      @Stability(Experimental) static GoFunctionProps.Builder builder()
      a GoFunctionProps.Builder of GoFunctionProps