migration

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenameFromInsightsIndexName

func RenameFromInsightsIndexName(insightsIndexName, newIndexTagName string) string

RenameFromInsightsIndexName - rename from the original insights index name to the new index name This must remove extra tags from re-indexes.

Types

type Status

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

func New

func New(client backend.Client) *Status

func (*Status) CompletedTasks

func (ms *Status) CompletedTasks() int64

CompletedTasks returns the number of tasks completed

func (*Status) Done

func (ms *Status) Done() bool

Done reports when the migration is done or it is still in progress

func (*Status) MarkUnneeded

func (ms *Status) MarkUnneeded()

MarkUnneeded marks the migrations status to done

func (*Status) MigrationNeeded

func (ms *Status) MigrationNeeded() (bool, error)

MigrationNeeded Verify if a migration is needed

func (*Status) Start

func (ms *Status) Start()

Start - start the migration from a prior automate to the current automate for only the config-mgmt-service.

We would like to use the Chain-of-responsibility pattern here but cannot because of the requirement of two stages of migration. We can not have the second stage start its migration from version 1 -> 2 after the first stage has migrated from 1 -> 2 -> ... -> n. This causes a problem because the second stage is migration from 1 -> 2 does not know what state the first stage has left the data in. For the migration framework we are always going to migrate from the current state to the current version. This does cause a maintenance problem because for each new version the old migration stages need to be updated.

func (*Status) String

func (ms *Status) String() string

String formats the migration status message

func (*Status) TotalTasks

func (ms *Status) TotalTasks() int64

TotalTasks returns the total number of tasks to process a migration

Jump to

Keyboard shortcuts

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