Documentation
¶
Index ¶
- func DefragmentData(defragCtx context.Context, clientMaintenance client.MaintenanceCloser, ...) error
- func GetEtcdEndPointsSorted(ctx context.Context, clientMaintenance client.MaintenanceCloser, ...) ([]string, []string, error)
- func GetTLSClientForEtcd(tlsConfig *brtypes.EtcdConnectionConfig, options *client.Options) (*clientv3.Client, error)
- func NewClientFactory(fn brtypes.NewClientFactoryFunc, cfg brtypes.EtcdConnectionConfig) client.Factory
- func NewFactory(cfg brtypes.EtcdConnectionConfig, opts ...client.Option) client.Factory
- func PerformDefragmentation(defragCtx context.Context, client client.MaintenanceCloser, endpoint string, ...) error
- func TakeAndSaveFullSnapshot(ctx context.Context, client client.MaintenanceCloser, store brtypes.SnapStore, ...) (*brtypes.Snapshot, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefragmentData ¶ added in v0.29.0
func DefragmentData(defragCtx context.Context, clientMaintenance client.MaintenanceCloser, clientCluster client.ClusterCloser, etcdEndpoints []string, defragTimeout time.Duration, logger *logrus.Entry) error
DefragmentData calls the defragmentation on each etcd followers endPoints then calls the defragmentation on etcd leader endPoints.
func GetEtcdEndPointsSorted ¶ added in v0.29.0
func GetEtcdEndPointsSorted(ctx context.Context, clientMaintenance client.MaintenanceCloser, clientCluster client.ClusterCloser, etcdEndpoints []string, logger *logrus.Entry) ([]string, []string, error)
GetEtcdEndPointsSorted returns the etcd leaderEndpoints and etcd followerEndpoints.
func GetTLSClientForEtcd ¶
func GetTLSClientForEtcd(tlsConfig *brtypes.EtcdConnectionConfig, options *client.Options) (*clientv3.Client, error)
GetTLSClientForEtcd creates an etcd client using the TLS config params.
func NewClientFactory ¶ added in v0.29.0
func NewClientFactory(fn brtypes.NewClientFactoryFunc, cfg brtypes.EtcdConnectionConfig) client.Factory
NewClientFactory returns the Factory using the supplied EtcdConnectionConfig.
func NewFactory ¶ added in v0.29.0
NewFactory returns a Factory that constructs new clients using the supplied ETCD client configuration.
func PerformDefragmentation ¶ added in v0.29.0
func PerformDefragmentation(defragCtx context.Context, client client.MaintenanceCloser, endpoint string, logger *logrus.Entry) error
PerformDefragmentation defragment the data directory of each etcd member.
func TakeAndSaveFullSnapshot ¶ added in v0.29.0
func TakeAndSaveFullSnapshot(ctx context.Context, client client.MaintenanceCloser, store brtypes.SnapStore, tempDir string, lastRevision int64, cc *compressor.CompressionConfig, suffix string, isFinal bool, logger *logrus.Entry) (*brtypes.Snapshot, error)
TakeAndSaveFullSnapshot does the following operations:
- takes the full snapshot of etcd database
- verify the full snapshot's integrity check
- compress the full snapshot(if compression is enabled)
- finally, save the full snapshot to object store(if configured).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.