forked from localstack/lambda-runtime-init
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.go
More file actions
19 lines (15 loc) · 771 Bytes
/
bootstrap.go
File metadata and controls
19 lines (15 loc) · 771 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package interop
import (
"os"
"go.amzn.com/lambda/fatalerror"
"go.amzn.com/lambda/rapidcore/env"
)
type Bootstrap interface {
Cmd() ([]string, error) // returns the args of bootstrap, where args[0] is the path to executable
Env(e *env.Environment) map[string]string // returns the environment variables to be passed to the bootstrapped process
Cwd() (string, error) // returns the working directory of the bootstrap process
ExtraFiles() []*os.File // returns the extra file descriptors apart from 1 & 2 to be passed to runtime
CachedFatalError(err error) (fatalerror.ErrorType, string, bool)
}