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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LeaseBlank = (&LeaseDie{}).DieFeed(coordinationv1.Lease{})
View Source
var LeaseSpecBlank = (&LeaseSpecDie{}).DieFeed(coordinationv1.LeaseSpec{})

Functions

This section is empty.

Types

type LeaseDie

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

func (*LeaseDie) APIVersion added in v0.5.0

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

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 (*LeaseDie) DeepCopy

func (d *LeaseDie) DeepCopy() *LeaseDie

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

func (*LeaseDie) DeepCopyObject

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

func (*LeaseDie) DieFeed

func (d *LeaseDie) DieFeed(r coordinationv1.Lease) *LeaseDie

DieFeed returns a new die with the provided resource.

func (*LeaseDie) DieFeedJSON added in v0.8.0

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

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

func (*LeaseDie) DieFeedPtr

func (d *LeaseDie) DieFeedPtr(r *coordinationv1.Lease) *LeaseDie

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

func (*LeaseDie) DieFeedRawExtension added in v0.5.0

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

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

func (*LeaseDie) DieFeedYAML added in v0.8.0

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

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

func (*LeaseDie) DieFeedYAMLFile added in v0.8.0

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

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

func (*LeaseDie) DieImmutable

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

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

func (*LeaseDie) DieRelease

func (d *LeaseDie) DieRelease() coordinationv1.Lease

DieRelease returns the resource managed by the die.

func (*LeaseDie) DieReleaseJSON added in v0.8.0

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

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

func (*LeaseDie) DieReleasePtr

func (d *LeaseDie) DieReleasePtr() *coordinationv1.Lease

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

func (*LeaseDie) DieReleaseRawExtension added in v0.5.0

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

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

func (*LeaseDie) DieReleaseUnstructured

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

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

func (*LeaseDie) DieReleaseYAML added in v0.8.0

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

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

func (*LeaseDie) DieStamp

func (d *LeaseDie) DieStamp(fn func(r *coordinationv1.Lease)) *LeaseDie

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

func (*LeaseDie) DieStampAt added in v0.8.0

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

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 (*LeaseDie) DieWith added in v0.9.0

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

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

func (*LeaseDie) GetObjectKind

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

func (*LeaseDie) Kind added in v0.5.0

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

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 (*LeaseDie) MarshalJSON

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

func (*LeaseDie) MetadataDie

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

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

func (*LeaseDie) Spec

spec contains the specification of the Lease.

More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

func (*LeaseDie) SpecDie

func (d *LeaseDie) SpecDie(fn func(d *LeaseSpecDie)) *LeaseDie

SpecDie stamps the resource's spec field with a mutable die.

func (*LeaseDie) UnmarshalJSON

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

type LeaseSpecDie

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

func (*LeaseSpecDie) AcquireTime

func (d *LeaseSpecDie) AcquireTime(v *apismetav1.MicroTime) *LeaseSpecDie

acquireTime is a time when the current lease was acquired.

func (*LeaseSpecDie) DeepCopy

func (d *LeaseSpecDie) DeepCopy() *LeaseSpecDie

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

func (*LeaseSpecDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*LeaseSpecDie) DieFeedJSON added in v0.8.0

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

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

func (*LeaseSpecDie) DieFeedPtr

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

func (*LeaseSpecDie) DieFeedRawExtension added in v0.5.0

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

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

func (*LeaseSpecDie) DieFeedYAML added in v0.8.0

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

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

func (*LeaseSpecDie) DieFeedYAMLFile added in v0.8.0

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

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

func (*LeaseSpecDie) DieImmutable

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

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

func (*LeaseSpecDie) DieRelease

func (d *LeaseSpecDie) DieRelease() coordinationv1.LeaseSpec

DieRelease returns the resource managed by the die.

func (*LeaseSpecDie) DieReleaseJSON added in v0.8.0

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

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

func (*LeaseSpecDie) DieReleasePtr

func (d *LeaseSpecDie) DieReleasePtr() *coordinationv1.LeaseSpec

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

func (*LeaseSpecDie) DieReleaseRawExtension added in v0.5.0

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

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

func (*LeaseSpecDie) DieReleaseYAML added in v0.8.0

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

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

func (*LeaseSpecDie) DieStamp

func (d *LeaseSpecDie) DieStamp(fn func(r *coordinationv1.LeaseSpec)) *LeaseSpecDie

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

func (*LeaseSpecDie) DieStampAt added in v0.8.0

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

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 (*LeaseSpecDie) DieWith added in v0.9.0

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

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

func (*LeaseSpecDie) HolderIdentity

func (d *LeaseSpecDie) HolderIdentity(v *string) *LeaseSpecDie

holderIdentity contains the identity of the holder of a current lease.

func (*LeaseSpecDie) LeaseDurationSeconds

func (d *LeaseSpecDie) LeaseDurationSeconds(v *int32) *LeaseSpecDie

leaseDurationSeconds is a duration that candidates for a lease need

to wait to force acquire it. This is measure against time of last

observed renewTime.

func (*LeaseSpecDie) LeaseTransitions

func (d *LeaseSpecDie) LeaseTransitions(v *int32) *LeaseSpecDie

leaseTransitions is the number of transitions of a lease between

holders.

func (*LeaseSpecDie) RenewTime

func (d *LeaseSpecDie) RenewTime(v *apismetav1.MicroTime) *LeaseSpecDie

renewTime is a time when the current holder of a lease has last

updated the lease.

Jump to

Keyboard shortcuts

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