status

package
v0.0.0-...-be2ef80 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	MigrationLabelESa1    = "ElasticSearch_A1"
	MigrationLabelESa2v1  = "ElasticSearch_A2_v1"
	MigrationLabelESa2v2  = "ElasticSearch_A2_v2"
	MigrationLabelESa2v3  = "ElasticSearch_A2_v3"
	MigrationLabelESa2v4  = "ElasticSearch_A2_v4"
	MigrationLabelESa2v5  = "ElasticSearch_A2_v5"
	MigrationLabelESa2v6  = "ElasticSearch_A2_v6"
	MigrationLabelCompRun = "Comp_Run_Info"
	MigrationLabelPG      = "PostgreSQL"
	MigrationLabelPRO     = "Profiles"
)

List of labels used to differentiate between migrations that can run independent of each other

View Source
const MigrationCompletedMsg = "COMPLETED"
View Source
const MigrationFailedMsg = "FAILED"

Special message sent by the services to flag the end of a migration either failed or successful

Variables

This section is empty.

Functions

func AddMigrationUpdate

func AddMigrationUpdate(migServer *Server, logLabel string, logText string)

AddMigrationUpdate is the entrypoint for sending updates about running migrations or finishing them It receives the update and places it into the LogEntry channel

Types

type Server

type Server struct {
	MigrationStatus         *status.MigrationStatus
	MigrationChannel        chan status.LogEntry
	DB                      pgdb.Storage
	EnableEnhancedReporting bool
}

Server struct

func New

func New(enabledEnhancedReporting bool) *Server

New creates a new instance of Server

func (*Server) GetControlIndexMigrationStatus

func (srv *Server) GetControlIndexMigrationStatus(ctx context.Context, empty *pb.Empty) (*status.ControlIndexMigrationStatus, error)

GetControlIndexMigrationStatus is the service endpoint to get the status of Control Index migration status

func (*Server) GetMigrationStatus

func (srv *Server) GetMigrationStatus(ctx context.Context, empty *pb.Empty) (*status.MigrationStatus, error)

GetMigrationStatus returns the migration status of the service

func (*Server) SetPGBackend

func (srv *Server) SetPGBackend(db *pgdb.DB)

Jump to

Keyboard shortcuts

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