Documentation
¶
Overview ¶
Package kptops contains implementations of kpt operations
Index ¶
- Constants
- Variables
- func NewRenderer(runnerOptions runneroptions.RunnerOptions) fn.Renderer
- func PkgUpdate(ctx context.Context, ref string, packageDir string, _ PkgUpdateOpts) error
- func UpdateKptfileName(name string, contents map[string]string) error
- func UpdateKptfileUpstream(name string, contents map[string]string, upstream kptfilev1.Upstream, ...) error
- func UpdateName(kptfileContents string, name string) (string, error)
- func UpdateUpstream(kptfileContents string, name string, upstream kptfilev1.Upstream, ...) (string, error)
- type Executor
- type FunctionRuntime
- type PkgUpdateOpts
- type Renderer
Constants ¶
View Source
const ( Dry hydrationState = iota Hydrating Wet )
constants for all the hydration states
Variables ¶
View Source
var ErrAllowedExecNotSpecified = fmt.Errorf("must run with `--allow-exec` option to allow running function binaries")
ErrAllowedExecNotSpecified indicates user need to authorize to invoke exec binaries.
Functions ¶
func NewRenderer ¶
func NewRenderer(runnerOptions runneroptions.RunnerOptions) fn.Renderer
func PkgUpdate ¶
PkgUpdate is a wrapper around `kpt pkg update`, running it against the package in packageDir
func UpdateKptfileUpstream ¶
Types ¶
type Executor ¶
type Executor struct {
PkgPath string
ResultsDirPath string
Output io.Writer
RunnerOptions runneroptions.RunnerOptions
FileSystem filesys.FileSystem
// function runtime
Runtime fn.FunctionRuntime
// contains filtered or unexported fields
}
Executor executes a hook.
type FunctionRuntime ¶
type FunctionRuntime interface {
fn.FunctionRuntime
io.Closer
}
type PkgUpdateOpts ¶
type PkgUpdateOpts struct {
Strategy string
}
PkgUpdateOpts are options for invoking kpt PkgUpdate
type Renderer ¶
type Renderer struct {
// PkgPath is the absolute path to the root package
PkgPath string
// Runtime knows how to pick a function runner for a given function
Runtime fn.FunctionRuntime
// ResultsDirPath is absolute path to the directory to write results
ResultsDirPath string
// Output is the writer to which the output resources are written
Output io.Writer
// RunnerOptions contains options controlling function execution.
RunnerOptions runneroptions.RunnerOptions
// FileSystem is the input filesystem to operate on
FileSystem filesys.FileSystem
// DisplayName is an optional field to modify the package name displayed in logs
DisplayName string
// contains filtered or unexported fields
}
Renderer hydrates a given pkg by running the functions in the input pipeline
func (*Renderer) Execute ¶
func (e *Renderer) Execute(ctx context.Context) (*fnresultv1.ResultList, error)
Execute runs a pipeline.
Click to show internal directories.
Click to hide internal directories.