Documentation ¶
Overview ¶
Package recording provides utilities for recording and replaying.
Index ¶
- Variables
- func NewReadHook(r io.Reader, hook func([]byte) []byte) io.Reader
- func NewWriteHook(w io.Writer, hook func([]byte) []byte) io.Writer
- func ReplaceTimeToRelative(baseTime time.Time, data []byte) []byte
- func RevertTimeFromRelative(baseTime time.Time, data []byte) []byte
- type Handle
- type ResourcePatch
- func (r *ResourcePatch) DeepCopyObject() runtime.Object
- func (r *ResourcePatch) GetDuration() time.Duration
- func (r *ResourcePatch) GetTargetGroupVersionResource() schema.GroupVersionResource
- func (r *ResourcePatch) GetTargetName() (string, string)
- func (r *ResourcePatch) SetContent(obj metav1.Object, track map[log.ObjectRef]json.RawMessage, ...) error
- func (r *ResourcePatch) SetDelete(obj metav1.Object, track map[log.ObjectRef]json.RawMessage)
- func (r *ResourcePatch) SetDuration(dur time.Duration)
- func (r *ResourcePatch) SetTargetGroupVersionResource(gvr schema.GroupVersionResource)
- func (r *ResourcePatch) SetTargetName(name, namespace string)
- type Speed
Constants ¶
This section is empty.
Variables ¶
var ResourcePatchType = metav1.TypeMeta{ Kind: v1alpha1.ResourcePatchKind, APIVersion: v1alpha1.GroupVersion.String(), }
ResourcePatchType is the type of the ResourcePatch.
Functions ¶
func NewReadHook ¶
NewReadHook creates a new read hook.
func NewWriteHook ¶
NewWriteHook creates a new write hook.
func ReplaceTimeToRelative ¶
ReplaceTimeToRelative replaces the time to relative.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is a struct that represents a handle with pause and Speed properties.
type ResourcePatch ¶
type ResourcePatch v1alpha1.ResourcePatch
ResourcePatch is the patch of the resource.
func (*ResourcePatch) DeepCopyObject ¶
func (r *ResourcePatch) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
func (*ResourcePatch) GetDuration ¶
func (r *ResourcePatch) GetDuration() time.Duration
GetDuration returns the duration of the ResourcePatch.
func (*ResourcePatch) GetTargetGroupVersionResource ¶
func (r *ResourcePatch) GetTargetGroupVersionResource() schema.GroupVersionResource
GetTargetGroupVersionResource returns the target group version resource of the ResourcePatch.
func (*ResourcePatch) GetTargetName ¶
func (r *ResourcePatch) GetTargetName() (string, string)
GetTargetName returns the target name of the ResourcePatch.
func (*ResourcePatch) SetContent ¶
func (r *ResourcePatch) SetContent(obj metav1.Object, track map[log.ObjectRef]json.RawMessage, patchMeta strategicpatch.LookupPatchMeta) error
SetContent sets the content of the ResourcePatch.
func (*ResourcePatch) SetDelete ¶
func (r *ResourcePatch) SetDelete(obj metav1.Object, track map[log.ObjectRef]json.RawMessage)
SetDelete sets the delete of the ResourcePatch.
func (*ResourcePatch) SetDuration ¶
func (r *ResourcePatch) SetDuration(dur time.Duration)
SetDuration sets the duration of the ResourcePatch.
func (*ResourcePatch) SetTargetGroupVersionResource ¶
func (r *ResourcePatch) SetTargetGroupVersionResource(gvr schema.GroupVersionResource)
SetTargetGroupVersionResource sets the target group version resource of the ResourcePatch.
func (*ResourcePatch) SetTargetName ¶
func (r *ResourcePatch) SetTargetName(name, namespace string)
SetTargetName sets the target name of the ResourcePatch.