runtime

package
v0.4.1-debug.8 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: Apache-2.0 Imports: 19 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesRuntime

type KubernetesRuntime struct {
	// contains filtered or unexported fields
}

func (*KubernetesRuntime) Apply

func (k *KubernetesRuntime) Apply(ctx context.Context, priorState, planState *states.ResourceState) (*states.ResourceState, status.Status)

Apply kubernetes resource by client-go

func (*KubernetesRuntime) Delete

func (k *KubernetesRuntime) Delete(ctx context.Context, resourceState *states.ResourceState) status.Status

Delete kubernetes resource by client-go

func (*KubernetesRuntime) Read

Read kubernetes resource by client-go

func (*KubernetesRuntime) Watch

Watch kubernetes resource by client-go

type Runtime

type Runtime interface {
	// Apply resource with planState. priorState is given to Runtime for three-way-merge if it needs
	Apply(ctx context.Context, priorState, planState *states.ResourceState) (*states.ResourceState, status.Status)

	// Read the latest state of this resource
	Read(ctx context.Context, resourceState *states.ResourceState) (*states.ResourceState, status.Status)

	// Delete resource
	Delete(ctx context.Context, resourceState *states.ResourceState) status.Status

	// Watch the latest state or event of this resource. This is very helpful for us to know what is happening when apply resources
	Watch(ctx context.Context, resourceState *states.ResourceState) (*states.ResourceState, status.Status)
}

func NewKubernetesRuntime

func NewKubernetesRuntime() (Runtime, error)

NewKubernetesRuntime create a new KubernetesRuntime

Jump to

Keyboard shortcuts

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