Documentation ¶
Index ¶
- func StringYaml(ctx string, obj interface{}) string
- type Builder
- type DefaultInstaller
- func (i *DefaultInstaller) GetUnstructuredObject() *unstructured.Unstructured
- func (i *DefaultInstaller) GoString() string
- func (i *DefaultInstaller) Install() error
- func (i *DefaultInstaller) String() string
- func (i *DefaultInstaller) UnInstall() error
- func (i *DefaultInstaller) Verify() (bool, error)
- type Predicate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringYaml ¶
StringYaml returns the provided object as a yaml formatted string
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder abstracts the construction of the builder
func BuilderForObject ¶
func BuilderForObject(obj *unstructured.Unstructured) *Builder
BuilderForObject creates the installer builder from the object provided
func BuilderForYaml ¶
BuilderForYaml creates the installer builder from the YAML provided
func (*Builder) Build ¶
func (b *Builder) Build() (*DefaultInstaller, error)
Build triggers the building of the installer
func (*Builder) WithKubeClient ¶
func (b *Builder) WithKubeClient(opts ...unstruct.KubeclientBuildOption) *Builder
WithKubeClient returns a new instance of unstructured kubeclient
type DefaultInstaller ¶
type DefaultInstaller struct { *unstruct.Kubeclient // contains filtered or unexported fields }
DefaultInstaller enables installing/uninstalling of resources in container orchestrator
func (*DefaultInstaller) GetUnstructuredObject ¶
func (i *DefaultInstaller) GetUnstructuredObject() *unstructured.Unstructured
GetUnstructuredObject returns Unstructured objecct
func (*DefaultInstaller) GoString ¶
func (i *DefaultInstaller) GoString() string
GoString implements GoStringer interface
func (*DefaultInstaller) Install ¶
func (i *DefaultInstaller) Install() error
Install triggers the installation of resource in the kubernetes cluster
func (*DefaultInstaller) String ¶
func (i *DefaultInstaller) String() string
String implements Stringer interface
func (*DefaultInstaller) UnInstall ¶
func (i *DefaultInstaller) UnInstall() error
UnInstall triggers deletion of resource from kubernetes cluster
func (*DefaultInstaller) Verify ¶
func (i *DefaultInstaller) Verify() (bool, error)
Verify returns the installation of resource. It returns true if all the predicates passes
type Predicate ¶
type Predicate func(*DefaultInstaller) bool
Predicate abstracts the verification of a resource
func IsPodRunning ¶
func IsPodRunning() Predicate
IsPodRunning returns true if the pod is in running state