statusreaders

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 22 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDeploymentResourceReader

func NewDeploymentResourceReader(reader engine.ClusterReader, mapper meta.RESTMapper, rsStatusReader engine.StatusReader) engine.StatusReader

func NewGenericStatusReader

func NewGenericStatusReader(reader engine.ClusterReader, mapper meta.RESTMapper) engine.StatusReader

func NewReplicaSetStatusReader

func NewReplicaSetStatusReader(reader engine.ClusterReader, mapper meta.RESTMapper, podStatusReader engine.StatusReader) engine.StatusReader

func NewStatefulSetResourceReader

func NewStatefulSetResourceReader(reader engine.ClusterReader, mapper meta.RESTMapper, podResourceReader engine.StatusReader) engine.StatusReader

Types

type BaseStatusReader

type BaseStatusReader struct {
	Reader engine.ClusterReader

	Mapper meta.RESTMapper
	// contains filtered or unexported fields
}

BaseStatusReader provides some basic functionality needed by the statusreaders.

func (*BaseStatusReader) GVK

GVK looks up the GVK from a GroupKind using the rest mapper.

func (*BaseStatusReader) LookupResource

func (b *BaseStatusReader) LookupResource(ctx context.Context, identifier wait.ResourceIdentifier) (*unstructured.Unstructured, error)

LookupResource looks up a resource with the given identifier. It will use the rest mapper to resolve the version of the GroupKind given in the identifier. If the resource is found, it is returned. If it is not found or something went wrong, the function will return an error.

func (*BaseStatusReader) SetComputeStatusFunc

func (b *BaseStatusReader) SetComputeStatusFunc(statusFunc engine.ComputeStatusFunc)

SetComputeStatusFunc allows for setting the function used by the engine for computing status. The default value here is to use the status package. This is provided for testing purposes.

func (*BaseStatusReader) StatusForGeneratedResources

func (b *BaseStatusReader) StatusForGeneratedResources(ctx context.Context, statusReader engine.StatusReader, object *unstructured.Unstructured,
	gk schema.GroupKind, selectorPath ...string) (event.ResourceStatuses, error)

StatusForGeneratedResources provides a way to fetch the statuses for all resources of a given GroupKind that match the selector in the provided resource. Typically, this is used to fetch the status of generated resources.

Jump to

Keyboard shortcuts

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