Documentation
¶
Index ¶
Constants ¶
View Source
const ( Error_Initialization = 101 Error_ComponentInitialization = 102 Error_ComponentContribution = 103 Error_ComponentInternal = 104 Error_ReadMetadata = 105 )
View Source
const ( RiffEnv = "RIFF" ArtifactEnv = "RIFF_ARTIFACT" HandlerEnv = "RIFF_HANDLER" OverrideEnv = "RIFF_OVERRIDE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buildpack ¶
type Buildpack struct {
BuildpackImplementation BuildpackImplementation
}
type BuildpackImplementation ¶
type BuildpackImplementation interface {
// Build is called during the build phase of the buildpack lifecycle.
Build(build build.Build) (int, error)
// Detect is called during the detect phase of the buildpack lifecycle.
Detect(detect detect.Detect, metadata Metadata) (int, error)
// Id returns the id of the function buildpack.
Id() string
}
BuildpackImplementation is an interface for types that implement concrete behaviors for build and detect.
type Metadata ¶
type Metadata struct {
// Artifact is the path to the main function artifact. This may be a java jar file, an executable file, etc
// May be autodetected or chosen by a collaborating buildpack
Artifact string `toml:"artifact"`
// Handler is a "finer grained" handler for the function within the artifact, if applicable.
// This may be a classname, a function name, etc. May be autodetected or chosen by a collaborating
// buildpack or function invoker.
Handler string `toml:"handler"`
// Override is an optional value provided by the user to force a given language for the function and
// completely bypass the detection mechanism, if needed.
Override string `toml:"override"`
}
Metadata represents the contents of the riff.toml file in an application root
func NewMetadata ¶
func NewMetadata(application application.Application, logger logger.Logger) (Metadata, bool, error)
NewMetadata creates a new Metadata from the contents of $APPLICATION_ROOT/riff.toml. If that file does not exist, the second return value is false.
Click to show internal directories.
Click to hide internal directories.