membergarbagecollector

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunMemberGarbageCollectorPeriodically

func RunMemberGarbageCollectorPeriodically(ctx context.Context, hconfig *brtypes.HealthConfig, logger *logrus.Entry, etcdConfig *brtypes.EtcdConnectionConfig)

RunMemberGarbageCollectorPeriodically periodically calls the member garbage collector

Types

type MGCChecker

type MGCChecker interface {
	RemoveSuperfluousMembers(ctx context.Context) error
}

MGCChecker garbage collects the members from the etcd cluster if its corresponding pod is not present. Used by Gomock to generate mock functions

type MemberGarbageCollector

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

MemberGarbageCollector contains information to regularly cleanup superfluous ETCD members

func NewMemberGarbageCollector

func NewMemberGarbageCollector(logger *logrus.Entry, clientSet client.Client, etcdTimeout wrappers.Duration) (*MemberGarbageCollector, error)

NewMemberGarbageCollector returns the member garbage collect object

func (*MemberGarbageCollector) RemoveSuperfluousMembers

func (mgc *MemberGarbageCollector) RemoveSuperfluousMembers(ctx context.Context, etcdCluster etcdclient.ClusterCloser) error

RemoveSuperfluousMembers removes a member from the etcd cluster if its corresponding pod is not present

Jump to

Keyboard shortcuts

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