Documentation
¶
Index ¶
- Variables
- type LeaseDie
- func (d *LeaseDie) APIVersion(v string) *LeaseDie
- func (d *LeaseDie) DeepCopy() *LeaseDie
- func (d *LeaseDie) DeepCopyObject() runtime.Object
- func (d *LeaseDie) DieDefaultTypeMetadata() *LeaseDie
- func (d *LeaseDie) DieDiff(opts ...cmp.Option) string
- func (d *LeaseDie) DieFeed(r coordinationv1.Lease) *LeaseDie
- func (d *LeaseDie) DieFeedJSON(j []byte) *LeaseDie
- func (d *LeaseDie) DieFeedPtr(r *coordinationv1.Lease) *LeaseDie
- func (d *LeaseDie) DieFeedRawExtension(raw runtime.RawExtension) *LeaseDie
- func (d *LeaseDie) DieFeedYAML(y []byte) *LeaseDie
- func (d *LeaseDie) DieFeedYAMLFile(name string) *LeaseDie
- func (d *LeaseDie) DieImmutable(immutable bool) *LeaseDie
- func (d *LeaseDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *LeaseDie) DieRelease() coordinationv1.Lease
- func (d *LeaseDie) DieReleaseJSON() []byte
- func (d *LeaseDie) DieReleasePtr() *coordinationv1.Lease
- func (d *LeaseDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *LeaseDie) DieReleaseUnstructured() *unstructured.Unstructured
- func (d *LeaseDie) DieReleaseYAML() []byte
- func (d *LeaseDie) DieSeal() *LeaseDie
- func (d *LeaseDie) DieSealFeed(r coordinationv1.Lease) *LeaseDie
- func (d *LeaseDie) DieSealFeedPtr(r *coordinationv1.Lease) *LeaseDie
- func (d *LeaseDie) DieSealRelease() coordinationv1.Lease
- func (d *LeaseDie) DieSealReleasePtr() *coordinationv1.Lease
- func (d *LeaseDie) DieStamp(fn func(r *coordinationv1.Lease)) *LeaseDie
- func (d *LeaseDie) DieStampAt(jp string, fn interface{}) *LeaseDie
- func (d *LeaseDie) DieWith(fns ...func(d *LeaseDie)) *LeaseDie
- func (d *LeaseDie) GetObjectKind() schema.ObjectKind
- func (d *LeaseDie) Kind(v string) *LeaseDie
- func (d *LeaseDie) MarshalJSON() ([]byte, error)
- func (d *LeaseDie) Metadata(v apismetav1.ObjectMeta) *LeaseDie
- func (d *LeaseDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *LeaseDie
- func (d *LeaseDie) Spec(v coordinationv1.LeaseSpec) *LeaseDie
- func (d *LeaseDie) SpecDie(fn func(d *LeaseSpecDie)) *LeaseDie
- func (d *LeaseDie) TypeMetadata(v apismetav1.TypeMeta) *LeaseDie
- func (d *LeaseDie) TypeMetadataDie(fn func(d *metav1.TypeMetaDie)) *LeaseDie
- func (d *LeaseDie) UnmarshalJSON(b []byte) error
- type LeaseSpecDie
- func (d *LeaseSpecDie) AcquireTime(v *apismetav1.MicroTime) *LeaseSpecDie
- func (d *LeaseSpecDie) DeepCopy() *LeaseSpecDie
- func (d *LeaseSpecDie) DieDiff(opts ...cmp.Option) string
- func (d *LeaseSpecDie) DieFeed(r coordinationv1.LeaseSpec) *LeaseSpecDie
- func (d *LeaseSpecDie) DieFeedJSON(j []byte) *LeaseSpecDie
- func (d *LeaseSpecDie) DieFeedPtr(r *coordinationv1.LeaseSpec) *LeaseSpecDie
- func (d *LeaseSpecDie) DieFeedRawExtension(raw runtime.RawExtension) *LeaseSpecDie
- func (d *LeaseSpecDie) DieFeedYAML(y []byte) *LeaseSpecDie
- func (d *LeaseSpecDie) DieFeedYAMLFile(name string) *LeaseSpecDie
- func (d *LeaseSpecDie) DieImmutable(immutable bool) *LeaseSpecDie
- func (d *LeaseSpecDie) DiePatch(patchType types.PatchType) ([]byte, error)
- func (d *LeaseSpecDie) DieRelease() coordinationv1.LeaseSpec
- func (d *LeaseSpecDie) DieReleaseJSON() []byte
- func (d *LeaseSpecDie) DieReleasePtr() *coordinationv1.LeaseSpec
- func (d *LeaseSpecDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *LeaseSpecDie) DieReleaseYAML() []byte
- func (d *LeaseSpecDie) DieSeal() *LeaseSpecDie
- func (d *LeaseSpecDie) DieSealFeed(r coordinationv1.LeaseSpec) *LeaseSpecDie
- func (d *LeaseSpecDie) DieSealFeedPtr(r *coordinationv1.LeaseSpec) *LeaseSpecDie
- func (d *LeaseSpecDie) DieSealRelease() coordinationv1.LeaseSpec
- func (d *LeaseSpecDie) DieSealReleasePtr() *coordinationv1.LeaseSpec
- func (d *LeaseSpecDie) DieStamp(fn func(r *coordinationv1.LeaseSpec)) *LeaseSpecDie
- func (d *LeaseSpecDie) DieStampAt(jp string, fn interface{}) *LeaseSpecDie
- func (d *LeaseSpecDie) DieWith(fns ...func(d *LeaseSpecDie)) *LeaseSpecDie
- func (d *LeaseSpecDie) HolderIdentity(v *string) *LeaseSpecDie
- func (d *LeaseSpecDie) LeaseDurationSeconds(v *int32) *LeaseSpecDie
- func (d *LeaseSpecDie) LeaseTransitions(v *int32) *LeaseSpecDie
- func (d *LeaseSpecDie) PreferredHolder(v *string) *LeaseSpecDie
- func (d *LeaseSpecDie) RenewTime(v *apismetav1.MicroTime) *LeaseSpecDie
- func (d *LeaseSpecDie) Strategy(v *coordinationv1.CoordinatedLeaseStrategy) *LeaseSpecDie
Constants ¶
This section is empty.
Variables ¶
var LeaseBlank = (&LeaseDie{}).DieFeed(coordinationv1.Lease{})
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 ¶
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 ¶
DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.
func (*LeaseDie) DeepCopyObject ¶
func (*LeaseDie) DieDefaultTypeMetadata ¶ added in v0.13.0
DieDefaultTypeMetadata sets the APIVersion and Kind to "coordination.k8s.io/v1" and "Lease" respectively.
func (*LeaseDie) DieDiff ¶ added in v0.13.0
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*LeaseDie) DieFeed ¶
func (d *LeaseDie) DieFeed(r coordinationv1.Lease) *LeaseDie
DieFeed returns a new die with the provided resource.
func (*LeaseDie) DieFeedJSON ¶
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 ¶
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 ¶
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*LeaseDie) DieFeedYAMLFile ¶
DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.
func (*LeaseDie) DieImmutable ¶
DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).
func (*LeaseDie) DiePatch ¶ added in v0.13.0
DiePatch generates a patch between the current value of the die and the sealed value.
func (*LeaseDie) DieRelease ¶
func (d *LeaseDie) DieRelease() coordinationv1.Lease
DieRelease returns the resource managed by the die.
func (*LeaseDie) DieReleaseJSON ¶
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 ¶
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 ¶
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*LeaseDie) DieSeal ¶ added in v0.13.0
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*LeaseDie) DieSealFeed ¶ added in v0.13.0
func (d *LeaseDie) DieSealFeed(r coordinationv1.Lease) *LeaseDie
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*LeaseDie) DieSealFeedPtr ¶ added in v0.13.0
func (d *LeaseDie) DieSealFeedPtr(r *coordinationv1.Lease) *LeaseDie
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*LeaseDie) DieSealRelease ¶ added in v0.13.0
func (d *LeaseDie) DieSealRelease() coordinationv1.Lease
DieSealRelease returns the sealed resource managed by the die.
func (*LeaseDie) DieSealReleasePtr ¶ added in v0.13.0
func (d *LeaseDie) DieSealReleasePtr() *coordinationv1.Lease
DieSealReleasePtr returns the sealed resource pointer managed by the die.
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 ¶
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 ¶
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 ¶
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 (*LeaseDie) Metadata ¶ added in v0.13.0
func (d *LeaseDie) Metadata(v apismetav1.ObjectMeta) *LeaseDie
Metadata standard object's metadata.
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 ¶
func (d *LeaseDie) Spec(v coordinationv1.LeaseSpec) *LeaseDie
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) TypeMetadata ¶ added in v0.13.0
func (d *LeaseDie) TypeMetadata(v apismetav1.TypeMeta) *LeaseDie
TypeMetadata standard object's type metadata.
func (*LeaseDie) TypeMetadataDie ¶ added in v0.13.0
func (d *LeaseDie) TypeMetadataDie(fn func(d *metav1.TypeMetaDie)) *LeaseDie
TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.
func (*LeaseDie) UnmarshalJSON ¶
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) DieDiff ¶ added in v0.13.0
func (d *LeaseSpecDie) DieDiff(opts ...cmp.Option) string
DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.
func (*LeaseSpecDie) DieFeed ¶
func (d *LeaseSpecDie) DieFeed(r coordinationv1.LeaseSpec) *LeaseSpecDie
DieFeed returns a new die with the provided resource.
func (*LeaseSpecDie) DieFeedJSON ¶
func (d *LeaseSpecDie) DieFeedJSON(j []byte) *LeaseSpecDie
DieFeedJSON returns a new die with the provided JSON. Panics on error.
func (*LeaseSpecDie) DieFeedPtr ¶
func (d *LeaseSpecDie) DieFeedPtr(r *coordinationv1.LeaseSpec) *LeaseSpecDie
DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.
func (*LeaseSpecDie) DieFeedRawExtension ¶
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 ¶
func (d *LeaseSpecDie) DieFeedYAML(y []byte) *LeaseSpecDie
DieFeedYAML returns a new die with the provided YAML. Panics on error.
func (*LeaseSpecDie) DieFeedYAMLFile ¶
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) DiePatch ¶ added in v0.13.0
func (d *LeaseSpecDie) DiePatch(patchType types.PatchType) ([]byte, error)
DiePatch generates a patch between the current value of the die and the sealed value.
func (*LeaseSpecDie) DieRelease ¶
func (d *LeaseSpecDie) DieRelease() coordinationv1.LeaseSpec
DieRelease returns the resource managed by the die.
func (*LeaseSpecDie) DieReleaseJSON ¶
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 ¶
func (d *LeaseSpecDie) DieReleaseRawExtension() runtime.RawExtension
DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.
func (*LeaseSpecDie) DieReleaseYAML ¶
func (d *LeaseSpecDie) DieReleaseYAML() []byte
DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.
func (*LeaseSpecDie) DieSeal ¶ added in v0.13.0
func (d *LeaseSpecDie) DieSeal() *LeaseSpecDie
DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.
func (*LeaseSpecDie) DieSealFeed ¶ added in v0.13.0
func (d *LeaseSpecDie) DieSealFeed(r coordinationv1.LeaseSpec) *LeaseSpecDie
DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.
func (*LeaseSpecDie) DieSealFeedPtr ¶ added in v0.13.0
func (d *LeaseSpecDie) DieSealFeedPtr(r *coordinationv1.LeaseSpec) *LeaseSpecDie
DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.
func (*LeaseSpecDie) DieSealRelease ¶ added in v0.13.0
func (d *LeaseSpecDie) DieSealRelease() coordinationv1.LeaseSpec
DieSealRelease returns the sealed resource managed by the die.
func (*LeaseSpecDie) DieSealReleasePtr ¶ added in v0.13.0
func (d *LeaseSpecDie) DieSealReleasePtr() *coordinationv1.LeaseSpec
DieSealReleasePtr returns the sealed resource pointer managed by the die.
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 ¶
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 ¶
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.
If Coordinated Leader Election is used, the holder identity must be ¶
equal to the elected LeaseCandidate.metadata.name field.
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 measured against the 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) PreferredHolder ¶ added in v0.14.0
func (d *LeaseSpecDie) PreferredHolder(v *string) *LeaseSpecDie
PreferredHolder signals to a lease holder that the lease has a
more optimal holder and should be given up.
This field can only be set if Strategy is also set.
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.
func (*LeaseSpecDie) Strategy ¶ added in v0.14.0
func (d *LeaseSpecDie) Strategy(v *coordinationv1.CoordinatedLeaseStrategy) *LeaseSpecDie
Strategy indicates the strategy for picking the leader for coordinated leader election.
If the field is not specified, there is no active coordination for this lease.
(Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.