pluginpolicy

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoPolicyFingerprint = ""

	ExecWorkdirSource          = "source"
	DefaultInitTimeout         = 10 * time.Second
	DefaultGenerateTimeout     = 60 * time.Second
	DefaultPostRendererTimeout = 30 * time.Second
	DefaultMaxStdoutBytes      = int64(10 * 1024 * 1024)
	DefaultMaxStderrBytes      = int64(64 * 1024)
)

Variables

This section is empty.

Functions

func Fingerprint

func Fingerprint(policy Policy) (string, error)

Types

type Engine

type Engine string
const (
	EngineAVPCompat       Engine = "avp-compat"
	EngineNativeKustomize Engine = "native-kustomize"
	EngineExec            Engine = "exec"
)

type ExecCommand

type ExecCommand struct {
	Command []string
	Timeout time.Duration
}

type ExecConfig

type ExecConfig struct {
	Workdir       string
	Init          *ExecCommand
	Generate      ExecCommand
	PostRenderers []ExecCommand
	Env           ExecEnv
	Output        ExecOutput
}

type ExecEnv

type ExecEnv struct {
	Allow []string
}

type ExecOutput

type ExecOutput struct {
	MaxStdoutBytes int64
	MaxStderrBytes int64
}

type Plugin

type Plugin struct {
	Engine Engine
	Exec   *ExecConfig
}

type Policy

type Policy struct {
	Plugins map[string]Plugin
}

func Parse

func Parse(path string, data []byte) (Policy, error)

func (Policy) Plugin

func (p Policy) Plugin(name string) (Plugin, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL