Documentation ¶
Index ¶
- func NewDefaultStatusReader(mapper meta.RESTMapper) engine.StatusReader
- func NewDeploymentResourceReader(mapper meta.RESTMapper, rsStatusReader resourceTypeStatusReader) engine.StatusReader
- func NewGenericStatusReader(mapper meta.RESTMapper, statusFunc StatusFunc) engine.StatusReader
- func NewReplicaSetStatusReader(mapper meta.RESTMapper, podStatusReader resourceTypeStatusReader) engine.StatusReader
- func NewStatefulSetResourceReader(mapper meta.RESTMapper, podResourceReader resourceTypeStatusReader) engine.StatusReader
- func NewStatusReader(mapper meta.RESTMapper, statusReaders ...engine.StatusReader) engine.StatusReader
- type DelegatingStatusReader
- func (dsr *DelegatingStatusReader) ReadStatus(ctx context.Context, reader engine.ClusterReader, id object.ObjMetadata) (*event.ResourceStatus, error)
- func (dsr *DelegatingStatusReader) ReadStatusForObject(ctx context.Context, reader engine.ClusterReader, ...) (*event.ResourceStatus, error)
- func (dsr *DelegatingStatusReader) Supports(gk schema.GroupKind) bool
- type StatusFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultStatusReader ¶
func NewDefaultStatusReader(mapper meta.RESTMapper) engine.StatusReader
NewDefaultStatusReader returns a DelegatingStatusReader that wraps a list of statusreaders to cover all built-in Kubernetes resources and other CRDs that follow known status conventions.
func NewDeploymentResourceReader ¶
func NewDeploymentResourceReader(mapper meta.RESTMapper, rsStatusReader resourceTypeStatusReader) engine.StatusReader
func NewGenericStatusReader ¶
func NewGenericStatusReader(mapper meta.RESTMapper, statusFunc StatusFunc) engine.StatusReader
func NewReplicaSetStatusReader ¶
func NewReplicaSetStatusReader(mapper meta.RESTMapper, podStatusReader resourceTypeStatusReader) engine.StatusReader
func NewStatefulSetResourceReader ¶
func NewStatefulSetResourceReader(mapper meta.RESTMapper, podResourceReader resourceTypeStatusReader) engine.StatusReader
func NewStatusReader ¶
func NewStatusReader(mapper meta.RESTMapper, statusReaders ...engine.StatusReader) engine.StatusReader
NewStatusReader returns a DelegatingStatusReader that includes the statusreaders for the build-in Kubernetes resources and also any provided custom status readers.
Types ¶
type DelegatingStatusReader ¶
type DelegatingStatusReader struct {
StatusReaders []engine.StatusReader
}
func (*DelegatingStatusReader) ReadStatus ¶
func (dsr *DelegatingStatusReader) ReadStatus( ctx context.Context, reader engine.ClusterReader, id object.ObjMetadata, ) (*event.ResourceStatus, error)
func (*DelegatingStatusReader) ReadStatusForObject ¶
func (dsr *DelegatingStatusReader) ReadStatusForObject( ctx context.Context, reader engine.ClusterReader, obj *unstructured.Unstructured, ) (*event.ResourceStatus, error)
type StatusFunc ¶
type StatusFunc func(u *unstructured.Unstructured) (*status.Result, error)
StatusFunc returns the status of the given object. This func is passed into NewGenericStatusReader so that the returned StatusReader can be used for custom types. An example of a StatusFunc is status.Compute.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.