Documentation ¶
Index ¶
- Variables
- func InitCerealManager(cerealManager *cereal.Manager, workerCount int, client *ingestic.ESClient, ...) error
- type ControlIndexUpgradeTask
- type MigrationWorkflow
- func (s *MigrationWorkflow) OnCancel(w cereal.WorkflowInstance, ev cereal.CancelEvent) cereal.Decision
- func (s *MigrationWorkflow) OnStart(w cereal.WorkflowInstance, ev cereal.StartEvent) cereal.Decision
- func (s *MigrationWorkflow) OnTaskComplete(w cereal.WorkflowInstance, ev cereal.TaskCompleteEvent) cereal.Decision
- type MigrationWorkflowParameters
- type MigrationWorkflowPayload
- type Upgrade
- type UpgradeParameters
- type UpgradeTask
Constants ¶
This section is empty.
Variables ¶
var ( MigrationWorkflowName = cereal.NewWorkflowName("migration-workflow") UpgradeTaskName = cereal.NewTaskName("upgrade-task") ControlIndexMigrationTaskName = cereal.NewTaskName("control-index-task") )
Functions ¶
func InitCerealManager ¶
Types ¶
type ControlIndexUpgradeTask ¶
type ControlIndexUpgradeTask struct { ESClient *ingestic.ESClient UpgradesDB *pgdb.UpgradesDB }
type MigrationWorkflow ¶
type MigrationWorkflow struct { }
func (*MigrationWorkflow) OnCancel ¶
func (s *MigrationWorkflow) OnCancel(w cereal.WorkflowInstance, ev cereal.CancelEvent) cereal.Decision
func (*MigrationWorkflow) OnStart ¶
func (s *MigrationWorkflow) OnStart(w cereal.WorkflowInstance, ev cereal.StartEvent) cereal.Decision
func (*MigrationWorkflow) OnTaskComplete ¶
func (s *MigrationWorkflow) OnTaskComplete(w cereal.WorkflowInstance, ev cereal.TaskCompleteEvent) cereal.Decision
type MigrationWorkflowPayload ¶
type MigrationWorkflowPayload struct {
ControlIndexFlag bool
}
type Upgrade ¶
type Upgrade struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(pg *pgdb.UpgradesDB, cerealManger *cereal.Manager) *Upgrade
func (*Upgrade) PollForUpgradeFlagDayLatest ¶
PollForUpgradeFlagDayLatest checks for the day latest flag value in upgrade flags
func (*Upgrade) UpdateFlags ¶
UpdateFlags makes the necessary changes to upgrade_flags table based on the received configuration as below If isConfigEnabled - true --> returns the existing timestamp(we need to run the upgrades till that day), and removes the flag record from DB once the upgrade is successful If isConfigEnabled - false and flag entry not available in DB --> create a record for enhanced_reporting with upgrade_time as current time, and update the control_index upgrade_value to true(so that when the config enabled, it triggers the upgrade for control index) If isConfigEnabled - false and flag entry available in DB --> update the control_index upgrade_value to true
type UpgradeParameters ¶
type UpgradeTask ¶
type UpgradeTask struct { ESClient *ingestic.ESClient UpgradesDB *pgdb.UpgradesDB }