heartbeat

package
v0.31.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// PeerURLTLSEnabledKey is the name of the annotation that will be added to the lease and will indicate whether TLS has been enabled for peer URL
	PeerURLTLSEnabledKey = "member.etcd.gardener.cloud/tls-enabled"
)

Variables

This section is empty.

Functions

func DeltaSnapshotCaseLeaseUpdate

func DeltaSnapshotCaseLeaseUpdate(ctx context.Context, logger *logrus.Entry, k8sClientset client.Client, deltaSnapshotLeaseName string, store brtypes.SnapStore) error

DeltaSnapshotCaseLeaseUpdate Updates the deltasnapshot lease as needed when a delta snapshot is taken

func FullSnapshotCaseLeaseUpdate

func FullSnapshotCaseLeaseUpdate(ctx context.Context, logger *logrus.Entry, fullSnapshot *brtypes.Snapshot, k8sClientset client.Client, fullSnapshotLeaseName string, fullSnapshotCreationTimestamp time.Time) error

FullSnapshotCaseLeaseUpdate Updates the fullsnapshot lease as needed when a full snapshot is taken

func RenewMemberLeasePeriodically

func RenewMemberLeasePeriodically(ctx context.Context, stopCh chan struct{}, hconfig *brtypes.HealthConfig, logger *logrus.Entry, etcdConfig *brtypes.EtcdConnectionConfig) error

RenewMemberLeasePeriodically has a timer and will periodically call RenewMemberLeases to renew the member lease until stopped

func UpdateDeltaSnapshotLease

func UpdateDeltaSnapshotLease(ctx context.Context, logger *logrus.Entry, prevDeltaSnapshots brtypes.SnapList, k8sClientset client.Client, deltaSnapshotLeaseName string) error

UpdateDeltaSnapshotLease renews delta snapshot lease and updates the holderIdentity field with the total number or revisions stored in delta snapshots since the last full snapshot was taken

func UpdateFullSnapshotLease

func UpdateFullSnapshotLease(ctx context.Context, logger *logrus.Entry, fullSnapshot *brtypes.Snapshot, k8sClientset client.Client, fullSnapshotLeaseName string, fullSnapshotCreationTimestamp time.Time) error

UpdateFullSnapshotLease renews the full snapshot lease and updates the holderIdentity field with the last revision in the latest full snapshot.

Types

type Heartbeat

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

Heartbeat contains information to perform regular heart beats in a Kubernetes cluster.

func NewHeartbeat

func NewHeartbeat(logger *logrus.Entry, etcdConfig *brtypes.EtcdConnectionConfig, clientSet client.Client, metadata map[string]string) (*Heartbeat, error)

NewHeartbeat returns the heartbeat object.

func (*Heartbeat) RenewMemberLease

func (hb *Heartbeat) RenewMemberLease(ctx context.Context) error

RenewMemberLease renews the member lease under the pod's identity.

Jump to

Keyboard shortcuts

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