migrator

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const MetaAliases = "*aliases"

Variables

View Source
var (
	ALIASES_PREFIX = "als_"
	Alias          = "Alias"
)

Functions

func AsThreshold2

func AsThreshold2(v2ATR engine.ActionTrigger) (thp *engine.ThresholdProfile, th *engine.Threshold, filter *engine.Filter, err error)

func NewV1CDRFromCDRSql

func NewV1CDRFromCDRSql(cdrSql *engine.CDRsql) (cdr *v1Cdrs, err error)

func NewV2SessionsCostFromSessionsCostSql

func NewV2SessionsCostFromSessionsCostSql(smSql *engine.SessionCostsSQL) (smV2 *v2SessionsCost, err error)

Types

type AcKeyValue

type AcKeyValue struct {
	Key   string
	Value v1Actions
}

type AtKeyValue

type AtKeyValue struct {
	Key   string
	Value v1ActionPlans
}

type Migrator

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

func NewMigrator

func NewMigrator(dmIN, dmOut MigratorDataDB,
	storDBIn, storDBOut MigratorStorDB,
	dryRun, sameDataDB, sameStorDB, sameOutDB bool) (m *Migrator, err error)

func (*Migrator) Close

func (m *Migrator) Close()

closes all opened DBs

func (*Migrator) Migrate

func (m *Migrator) Migrate(taskIDs []string) (err error, stats map[string]int)

Migrate implements the tasks to migrate, used as a dispatcher to the individual methods

func (*Migrator) SasThreshold

func (m *Migrator) SasThreshold(v2ATR *engine.ActionTrigger) (err error)

type MigratorDataDB

type MigratorDataDB interface {
	DataManager() *engine.DataManager
	// contains filtered or unexported methods
}

func NewMigratorDataDB

func NewMigratorDataDB(db_type, host, port, name, user, pass,
	marshaler string, cacheCfg config.CacheCfg, sentinelName string,
	itemsCacheCfg map[string]*config.ItemOpt) (db MigratorDataDB, err error)

type MigratorStorDB

type MigratorStorDB interface {
	StorDB() engine.StorDB
	// contains filtered or unexported methods
}

func NewMigratorStorDB

func NewMigratorStorDB(db_type, host, port, name, user, pass, marshaler, sslmode string,
	maxConn, maxIdleConn, connMaxLifetime int, stringIndexedFields, prefixIndexedFields []string,
	itemsCacheCfg map[string]*config.ItemOpt) (db MigratorStorDB, err error)

Jump to

Keyboard shortcuts

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