Documentation
¶
Index ¶
- func AsMain(input interface{}) error
- func Log(in ...interface{})
- func Logf(format string, in ...interface{})
- func ParseResourceContext(input []byte) (*rctxv1.ResourceContext, error)
- func Run(p ResourceContextProcessor, in []byte) ([]byte, error)
- type ByteReadWriter
- type ResourceContextProcessor
- type ResourceContextProcessorFunc
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsMain ¶
func AsMain(input interface{}) error
AsMain evaluates the ResourceContext from STDIN to STDOUT. `input` can be - a `ResourceContextProcessor` which implements `Process` method - a function `Runner` which implements `Run` method
func ParseResourceContext ¶
func ParseResourceContext(input []byte) (*rctxv1.ResourceContext, error)
Types ¶
type ByteReadWriter ¶
type ByteReadWriter struct { // Reader is where ResourceContext are decoded from. Reader io.Reader // Writer is where ResourceContext are encoded. Writer io.Writer }
func (*ByteReadWriter) Read ¶
func (rw *ByteReadWriter) Read() (*rctxv1.ResourceContext, error)
type ResourceContextProcessor ¶
type ResourceContextProcessor interface {
Process(rctx *rctxv1.ResourceContext) (bool, error)
}
ResourceContextProcessor is implemented by configuration functions built with this framework to conform to the Configuration Functions Specification: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md
type ResourceContextProcessorFunc ¶
type ResourceContextProcessorFunc func(rctx *rctxv1.ResourceContext) (bool, error)
ResourceContextProcessorFunc converts a compatible function to a ResourceContextProcessor.
func (ResourceContextProcessorFunc) Process ¶
func (p ResourceContextProcessorFunc) Process(rctx *rctxv1.ResourceContext) (bool, error)
type Runner ¶
type Runner interface { // Returns: // return a boolean to tell whether the execution should be considered as PASS or FAIL. Run(rctx *rctxv1.ResourceContext) bool }
Click to show internal directories.
Click to hide internal directories.