status

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package status contains types and helpers to manipulate the status of source objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PropagateCondition

func PropagateCondition(ctx context.Context, p *Patcher, src *v1alpha1.AWSSNSSource, cond *apis.Condition) error

PropagateCondition propagates a status condition to the status of the given source object using the provided Patcher.

func WithClock

func WithClock(ctx context.Context, c Clock) context.Context

WithClock returns a copy of the parent context in which the value associated with the clock key is the given Clock.

Types

type Clock

type Clock interface {
	Now() apis.VolatileTime
}

Clock can override the timestamp returned by time.Now().

func ClockFromContext

func ClockFromContext(ctx context.Context) Clock

ClockFromContext returns the Clock stored in the context.

type Patcher

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

Patcher can apply patches to the status of source objects.

func NewPatcher

func NewPatcher(component string, cli clientv1alpha1.AWSSNSSourceInterface) *Patcher

NewPatcher returns a named Patcher scoped at the provided namespace and initialized from the client interface carried by ctx.

func (*Patcher) Patch

func (p *Patcher) Patch(ctx context.Context, name string, patch duck.JSONPatch) (*v1alpha1.AWSSNSSource, error)

Patch applies the given JSON patch to the status of the source object referenced by name.

Jump to

Keyboard shortcuts

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