Documentation ¶
Index ¶
- Variables
- func ErrImmutableRessource(attribute string, obj runtime.Object) error
- func ErrsEqual(errA, errB error) bool
- func Eval(name string, src, runCtx interface{}, env starlark.StringDict) (starlark.Value, *bufio.Scanner, error)
- func KubeNoop() starlark.StringDict
- func New(addr string, d discovery.DiscoveryInterface, dynC dynamic.Interface, ...) starlark.StringDict
- func NewFake(force bool) (m starlark.StringDict, closeFn func(), err error)
- func NoOp(thread *starlark.Thread, f *starlark.Builtin, args starlark.Tuple, ...) (starlark.Value, error)
- func ValueFromJSON(v interface{}) (starlark.Value, error)
- func ValueFromNestedMap(m map[string]interface{}) (starlark.Value, error)
- type DynamicClient
- type Module
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Scheme = runtime.NewScheme() Codecs = serializer.NewCodecFactory(Scheme) )
View Source
var ErrNotFound = errors.New("not found")
View Source
var ErrUpdateImmutable = errors.New("cannot update immutable. Use -force to delete and recreate")
Functions ¶
func Eval ¶
func Eval(name string, src, runCtx interface{}, env starlark.StringDict) (starlark.Value, *bufio.Scanner, error)
Eval executes src in its own Starlark thread and returns a resulting Starlark value and a scanner that can be used to read eval output produced with a "print" built-in.
func KubeNoop ¶
func KubeNoop() starlark.StringDict
KubeNoop returns a new stringDict with noop methods.
func New ¶
func New( addr string, d discovery.DiscoveryInterface, dynC dynamic.Interface, c *http.Client, config *rest.Config, dryRun, force, diff bool, diffFilters []string, ) starlark.StringDict
New returns a new StringDict.
func NewFake ¶
func NewFake(force bool) (m starlark.StringDict, closeFn func(), err error)
NewFake returns a new fake kube module for testing. It takes a bool attribute to determine if the starkalrk.HasAttrs object should forcefully update resources
func ValueFromJSON ¶
ValueFromJSON converts JSON value to starlark.Value.
Types ¶
type DynamicClient ¶
type DynamicClient interface {
Apply(t *starlark.Thread, name string, namespace string, data *starlark.List) (starlark.Value, error)
}
DynamicClient used for applying dynamic resource manifests
type Module ¶
type Module struct { Name string Attrs starlark.StringDict }
Click to show internal directories.
Click to hide internal directories.