Documentation ¶
Index ¶
- Constants
- Variables
- func NewResourceStatusIndicator(object *unstructured.Unstructured) (indicator *indicators.StringEqualConditionIndicator, humanJSONPath string, ...)
- func SetWatchErrorHandler(cancelFn context.CancelFunc, resName string, ...) error
- type ContribResourceStatusRules
- type EventStatus
- type Feed
- func (f *Feed) OnAdded(function func(status *ResourceStatus) error)
- func (f *Feed) OnEventMsg(function func(event *corev1.Event) error)
- func (f *Feed) OnFailed(function func(status *ResourceStatus) error)
- func (f *Feed) OnReady(function func(status *ResourceStatus) error)
- func (f *Feed) OnStatus(function func(status *ResourceStatus) error)
- func (f *Feed) Track(ctx context.Context, timeout, noActivityTimeout time.Duration) error
- type ResourceEventsWatcher
- type ResourceStateWatcher
- type ResourceStatus
- type ResourceStatusJSONPathCondition
- type SetWatchErrorHandlerOptions
- type Tracker
- type TrackerState
- type UnrecoverableWatchError
Constants ¶
View Source
const ResourceStatusStabilizingDuration time.Duration = 2 * time.Second
Variables ¶
View Source
var ResourceStatusJSONPathConditions []*ResourceStatusJSONPathCondition
Functions ¶
func NewResourceStatusIndicator ¶
func NewResourceStatusIndicator(object *unstructured.Unstructured) (indicator *indicators.StringEqualConditionIndicator, humanJSONPath string, err error)
func SetWatchErrorHandler ¶ added in v0.9.5
func SetWatchErrorHandler(cancelFn context.CancelFunc, resName string, setWatchErrorHandler func(handler cache.WatchErrorHandler) error, opts SetWatchErrorHandlerOptions) error
Types ¶
type ContribResourceStatusRules ¶ added in v0.11.0
type ContribResourceStatusRules struct { Rules []struct { ResourceGroup *string `yaml:"resourceGroup"` ResourceKind *string `yaml:"resourceKind"` JSONPath string `yaml:"jsonPath"` HumanJSONPath string `yaml:"humanJsonPath"` Conditions struct { Ready []string `yaml:"ready"` Progressing []string `yaml:"progressing"` Failed []string `yaml:"failed"` } `yaml:"conditions"` } `yaml:"rules"` }
type EventStatus ¶
type EventStatus struct {
// contains filtered or unexported fields
}
func NewEventStatus ¶
func NewEventStatus(event *corev1.Event) *EventStatus
func (*EventStatus) FailureReason ¶
func (s *EventStatus) FailureReason() string
func (*EventStatus) IsFailure ¶
func (s *EventStatus) IsFailure() bool
type Feed ¶
type Feed struct {
// contains filtered or unexported fields
}
func (*Feed) OnAdded ¶
func (f *Feed) OnAdded(function func(status *ResourceStatus) error)
func (*Feed) OnFailed ¶
func (f *Feed) OnFailed(function func(status *ResourceStatus) error)
func (*Feed) OnReady ¶
func (f *Feed) OnReady(function func(status *ResourceStatus) error)
func (*Feed) OnStatus ¶
func (f *Feed) OnStatus(function func(status *ResourceStatus) error)
type ResourceEventsWatcher ¶
type ResourceEventsWatcher struct { ResourceID *resid.ResourceID // contains filtered or unexported fields }
func NewResourceEventsWatcher ¶
func NewResourceEventsWatcher( object *unstructured.Unstructured, resID *resid.ResourceID, client kubernetes.Interface, ) *ResourceEventsWatcher
type ResourceStateWatcher ¶
type ResourceStateWatcher struct { ResourceID *resid.ResourceID // contains filtered or unexported fields }
func NewResourceStateWatcher ¶
func NewResourceStateWatcher( resID *resid.ResourceID, client kubernetes.Interface, dynClient dynamic.Interface, mapper meta.RESTMapper, ) *ResourceStateWatcher
func (*ResourceStateWatcher) Run ¶
func (w *ResourceStateWatcher) Run(ctx context.Context, resourceAddedCh, resourceModifiedCh, resourceDeletedCh chan<- *unstructured.Unstructured) error
type ResourceStatus ¶
type ResourceStatus struct { Indicator *indicators.StringEqualConditionIndicator // contains filtered or unexported fields }
func NewDeletedResourceStatus ¶
func NewDeletedResourceStatus() *ResourceStatus
func NewFailedResourceStatus ¶
func NewFailedResourceStatus(failureReason string) *ResourceStatus
func NewResourceStatus ¶
func NewResourceStatus(object *unstructured.Unstructured) (*ResourceStatus, error)
func NewSucceededResourceStatus ¶ added in v0.9.5
func NewSucceededResourceStatus() *ResourceStatus
func (*ResourceStatus) DiffersFrom ¶
func (s *ResourceStatus) DiffersFrom(newStatus *ResourceStatus) bool
func (*ResourceStatus) FailureReason ¶
func (s *ResourceStatus) FailureReason() string
func (*ResourceStatus) HumanConditionPath ¶
func (s *ResourceStatus) HumanConditionPath() string
func (*ResourceStatus) IsDeleted ¶
func (s *ResourceStatus) IsDeleted() bool
func (*ResourceStatus) IsFailed ¶
func (s *ResourceStatus) IsFailed() bool
func (*ResourceStatus) IsReady ¶
func (s *ResourceStatus) IsReady() bool
type ResourceStatusJSONPathCondition ¶ added in v0.11.0
type SetWatchErrorHandlerOptions ¶ added in v0.9.5
type SetWatchErrorHandlerOptions struct {
FatalWatchErr *UnrecoverableWatchError // If unrecoverable watch error occurred it will be saved here.
}
type Tracker ¶
type Tracker struct { ResourceID *resid.ResourceID // contains filtered or unexported fields }
func NewTracker ¶
func NewTracker( resID *resid.ResourceID, client kubernetes.Interface, dynClient dynamic.Interface, discClient discovery.CachedDiscoveryInterface, mapper meta.RESTMapper, ) *Tracker
type TrackerState ¶
type TrackerState string
const ( TrackerStateInitial TrackerState = "TrackerStateInitial" TrackerStateStatusStabilizing TrackerState = "TrackerStateStatusStabilizing" TrackerStateStarted TrackerState = "TrackerStateStarted" TrackerStateResourceAdded TrackerState = "TrackerStateResourceAdded" TrackerStateResourceSucceeded TrackerState = "TrackerStateResourceSucceeded" TrackerStateResourceFailed TrackerState = "TrackerStateResourceFailed" TrackerStateResourceDeleted TrackerState = "TrackerStateResourceDeleted" )
type UnrecoverableWatchError ¶ added in v0.9.5
func (UnrecoverableWatchError) Error ¶ added in v0.9.5
func (e UnrecoverableWatchError) Error() string
func (UnrecoverableWatchError) Unwrap ¶ added in v0.9.5
func (e UnrecoverableWatchError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.