util

package
v0.0.0-...-5e118e0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginOptions

type PluginOptions struct {
	KubeConfigPath   string
	SrcContext       string
	DstContext       string
	SrcPluginAddress string
	DstPluginAddress string
	SrcClusterIp     string
	DstClusterIp     string
	SrcESNodePort    int64
	DstESNodePort    int64

	IndexName   string
	IndexFrom   string
	EsName      string
	EsNamespace string

	SrcKubeClient kubernetes.Interface
	DstKubeClient kubernetes.Interface
	SrcDmClient   dynamic.Interface
	DstDmClient   dynamic.Interface

	Debug bool
}

func (*PluginOptions) InsertIndex

func (opt *PluginOptions) InsertIndex() error

InsertIndex insert a index in the source Elasticsearch

func (*PluginOptions) Setup

func (opt *PluginOptions) Setup() error

func (*PluginOptions) ShowIndexes

func (opt *PluginOptions) ShowIndexes() (string, error)

ShowIndexes shows all the indexes from the source/destination Elasticsearch based on "index-from" flag If the value of "index-from" flag is "active" then it shows indexes of the source ES. Otherwise, it shows indexes from the destination ES.

func (*PluginOptions) TriggerInit

func (opt *PluginOptions) TriggerInit() error

TriggerInit prepare source and destination Elasticsearch to backup and restore from a Minio repository

func (*PluginOptions) TriggerSync

func (opt *PluginOptions) TriggerSync() error

TriggerSync calls SYNC API of the plugin in source cluster to initiate backup. Then, it waits for the backup to be completed. It continuously calls STATUS API to to check backup state. Once the backup is completed, it calls SYNC API of the plugin in destination cluster which initiate a restore. Then, it's wait for restore to be completed. Again, it uses STATUS API to check the restore sate.

Jump to

Keyboard shortcuts

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