v1

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventBlank = (&EventDie{}).DieFeed(eventsv1.Event{})
View Source
var EventSeriesBlank = (&EventSeriesDie{}).DieFeed(eventsv1.EventSeries{})

Functions

This section is empty.

Types

type EventDie

type EventDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*EventDie) APIVersion added in v0.5.0

func (d *EventDie) APIVersion(v string) *EventDie

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*EventDie) Action

func (d *EventDie) Action(v string) *EventDie

action is what action was taken/failed regarding to the regarding object. It is machine-readable.

This field cannot be empty for new Events and it can have at most 128 characters.

func (*EventDie) DeepCopy

func (d *EventDie) DeepCopy() *EventDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*EventDie) DeepCopyObject

func (d *EventDie) DeepCopyObject() runtime.Object

func (*EventDie) DeprecatedCount

func (d *EventDie) DeprecatedCount(v int32) *EventDie

deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.

func (*EventDie) DeprecatedFirstTimestamp

func (d *EventDie) DeprecatedFirstTimestamp(v apismetav1.Time) *EventDie

deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.

func (*EventDie) DeprecatedLastTimestamp

func (d *EventDie) DeprecatedLastTimestamp(v apismetav1.Time) *EventDie

deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.

func (*EventDie) DeprecatedSource

func (d *EventDie) DeprecatedSource(v corev1.EventSource) *EventDie

deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.

func (*EventDie) DeprecatedSourceDie

func (d *EventDie) DeprecatedSourceDie(fn func(d *diecorev1.EventSourceDie)) *EventDie

func (*EventDie) DieFeed

func (d *EventDie) DieFeed(r eventsv1.Event) *EventDie

DieFeed returns a new die with the provided resource.

func (*EventDie) DieFeedJSON added in v0.8.0

func (d *EventDie) DieFeedJSON(j []byte) *EventDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*EventDie) DieFeedPtr

func (d *EventDie) DieFeedPtr(r *eventsv1.Event) *EventDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*EventDie) DieFeedRawExtension added in v0.5.0

func (d *EventDie) DieFeedRawExtension(raw runtime.RawExtension) *EventDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*EventDie) DieFeedYAML added in v0.8.0

func (d *EventDie) DieFeedYAML(y []byte) *EventDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*EventDie) DieFeedYAMLFile added in v0.8.0

func (d *EventDie) DieFeedYAMLFile(name string) *EventDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*EventDie) DieImmutable

func (d *EventDie) DieImmutable(immutable bool) *EventDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*EventDie) DieRelease

func (d *EventDie) DieRelease() eventsv1.Event

DieRelease returns the resource managed by the die.

func (*EventDie) DieReleaseJSON added in v0.8.0

func (d *EventDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*EventDie) DieReleasePtr

func (d *EventDie) DieReleasePtr() *eventsv1.Event

DieReleasePtr returns a pointer to the resource managed by the die.

func (*EventDie) DieReleaseRawExtension added in v0.5.0

func (d *EventDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*EventDie) DieReleaseUnstructured

func (d *EventDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*EventDie) DieReleaseYAML added in v0.8.0

func (d *EventDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*EventDie) DieStamp

func (d *EventDie) DieStamp(fn func(r *eventsv1.Event)) *EventDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*EventDie) DieStampAt added in v0.8.0

func (d *EventDie) DieStampAt(jp string, fn interface{}) *EventDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*EventDie) DieWith added in v0.9.0

func (d *EventDie) DieWith(fns ...func(d *EventDie)) *EventDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*EventDie) EventTime

func (d *EventDie) EventTime(v apismetav1.MicroTime) *EventDie

eventTime is the time when this Event was first observed. It is required.

func (*EventDie) GetObjectKind

func (d *EventDie) GetObjectKind() schema.ObjectKind

func (*EventDie) Kind added in v0.5.0

func (d *EventDie) Kind(v string) *EventDie

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*EventDie) MarshalJSON

func (d *EventDie) MarshalJSON() ([]byte, error)

func (*EventDie) MetadataDie

func (d *EventDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *EventDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*EventDie) Note

func (d *EventDie) Note(v string) *EventDie

note is a human-readable description of the status of this operation.

Maximal length of the note is 1kB, but libraries should be prepared to

handle values up to 64kB.

func (*EventDie) Reason

func (d *EventDie) Reason(v string) *EventDie

reason is why the action was taken. It is human-readable.

This field cannot be empty for new Events and it can have at most 128 characters.

func (*EventDie) Regarding

func (d *EventDie) Regarding(v corev1.ObjectReference) *EventDie

regarding contains the object this Event is about. In most cases it's an Object reporting controller

implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because

it acts on some changes in a ReplicaSet object.

func (*EventDie) RegardingDie

func (d *EventDie) RegardingDie(fn func(d *diecorev1.ObjectReferenceDie)) *EventDie

func (*EventDie) Related

func (d *EventDie) Related(v *corev1.ObjectReference) *EventDie

related is the optional secondary object for more complex actions. E.g. when regarding object triggers

a creation or deletion of related object.

func (*EventDie) RelatedDie

func (d *EventDie) RelatedDie(fn func(d *diecorev1.ObjectReferenceDie)) *EventDie

func (*EventDie) ReportingController

func (d *EventDie) ReportingController(v string) *EventDie

reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.

This field cannot be empty for new Events.

func (*EventDie) ReportingInstance

func (d *EventDie) ReportingInstance(v string) *EventDie

reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`.

This field cannot be empty for new Events and it can have at most 128 characters.

func (*EventDie) Series

func (d *EventDie) Series(v *eventsv1.EventSeries) *EventDie

series is data about the Event series this event represents or nil if it's a singleton Event.

func (*EventDie) SeriesDie

func (d *EventDie) SeriesDie(fn func(d *EventSeriesDie)) *EventDie

func (*EventDie) Type

func (d *EventDie) Type(v string) *EventDie

type is the type of this event (Normal, Warning), new types could be added in the future.

It is machine-readable.

This field cannot be empty for new Events.

func (*EventDie) UnmarshalJSON

func (d *EventDie) UnmarshalJSON(b []byte) error

type EventSeriesDie

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

func (*EventSeriesDie) Count

func (d *EventSeriesDie) Count(v int32) *EventSeriesDie

count is the number of occurrences in this series up to the last heartbeat time.

func (*EventSeriesDie) DeepCopy

func (d *EventSeriesDie) DeepCopy() *EventSeriesDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*EventSeriesDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*EventSeriesDie) DieFeedJSON added in v0.8.0

func (d *EventSeriesDie) DieFeedJSON(j []byte) *EventSeriesDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*EventSeriesDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*EventSeriesDie) DieFeedRawExtension added in v0.5.0

func (d *EventSeriesDie) DieFeedRawExtension(raw runtime.RawExtension) *EventSeriesDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*EventSeriesDie) DieFeedYAML added in v0.8.0

func (d *EventSeriesDie) DieFeedYAML(y []byte) *EventSeriesDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*EventSeriesDie) DieFeedYAMLFile added in v0.8.0

func (d *EventSeriesDie) DieFeedYAMLFile(name string) *EventSeriesDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*EventSeriesDie) DieImmutable

func (d *EventSeriesDie) DieImmutable(immutable bool) *EventSeriesDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*EventSeriesDie) DieRelease

func (d *EventSeriesDie) DieRelease() eventsv1.EventSeries

DieRelease returns the resource managed by the die.

func (*EventSeriesDie) DieReleaseJSON added in v0.8.0

func (d *EventSeriesDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*EventSeriesDie) DieReleasePtr

func (d *EventSeriesDie) DieReleasePtr() *eventsv1.EventSeries

DieReleasePtr returns a pointer to the resource managed by the die.

func (*EventSeriesDie) DieReleaseRawExtension added in v0.5.0

func (d *EventSeriesDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*EventSeriesDie) DieReleaseYAML added in v0.8.0

func (d *EventSeriesDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*EventSeriesDie) DieStamp

func (d *EventSeriesDie) DieStamp(fn func(r *eventsv1.EventSeries)) *EventSeriesDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*EventSeriesDie) DieStampAt added in v0.8.0

func (d *EventSeriesDie) DieStampAt(jp string, fn interface{}) *EventSeriesDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*EventSeriesDie) DieWith added in v0.9.0

func (d *EventSeriesDie) DieWith(fns ...func(d *EventSeriesDie)) *EventSeriesDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*EventSeriesDie) LastObservedTime

func (d *EventSeriesDie) LastObservedTime(v apismetav1.MicroTime) *EventSeriesDie

lastObservedTime is the time when last Event from the series was seen before last heartbeat.

Jump to

Keyboard shortcuts

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