Documentation
¶
Index ¶
- func CheckDiffFileFormat(filePath string, task *TableDiffTask) error
- func RepsetDiff(task *RepsetDiffCmd) (err error)
- type HashResult
- type HashTask
- type NodeComparisonReport
- type NodeDiff
- type NodeSchemaReport
- type Range
- type RangeResults
- type RecursiveDiffTask
- type RepsetDiffCmd
- func (task *RepsetDiffCmd) CloneForSchedule(ctx context.Context) *RepsetDiffCmd
- func (c *RepsetDiffCmd) GetClusterName() string
- func (c *RepsetDiffCmd) GetClusterNodes() []map[string]any
- func (c *RepsetDiffCmd) GetDBName() string
- func (c *RepsetDiffCmd) GetNodeList() []string
- func (c *RepsetDiffCmd) GetNodes() string
- func (c *RepsetDiffCmd) RunChecks(skipValidation bool) error
- func (c *RepsetDiffCmd) SetClusterNodes(cn []map[string]any)
- func (c *RepsetDiffCmd) SetDBName(name string)
- func (c *RepsetDiffCmd) SetDatabase(db types.Database)
- func (c *RepsetDiffCmd) SetNodeList(nodes []string)
- func (c *RepsetDiffCmd) Validate() error
- type SchemaDiffCmd
- func (task *SchemaDiffCmd) CloneForSchedule(ctx context.Context) *SchemaDiffCmd
- func (c *SchemaDiffCmd) GetClusterName() string
- func (c *SchemaDiffCmd) GetClusterNodes() []map[string]any
- func (c *SchemaDiffCmd) GetDBName() string
- func (c *SchemaDiffCmd) GetNodeList() []string
- func (c *SchemaDiffCmd) GetNodes() string
- func (c *SchemaDiffCmd) RunChecks(skipValidation bool) error
- func (task *SchemaDiffCmd) SchemaTableDiff() (err error)
- func (c *SchemaDiffCmd) SetClusterNodes(cn []map[string]any)
- func (c *SchemaDiffCmd) SetDBName(name string)
- func (c *SchemaDiffCmd) SetDatabase(db types.Database)
- func (c *SchemaDiffCmd) SetNodeList(nodes []string)
- func (c *SchemaDiffCmd) Validate() error
- type SchemaObjects
- type SpockDiffTask
- func (t *SpockDiffTask) ExecuteTask() (err error)
- func (t *SpockDiffTask) GetClusterName() string
- func (t *SpockDiffTask) GetClusterNodes() []map[string]any
- func (t *SpockDiffTask) GetDBName() string
- func (t *SpockDiffTask) GetNodeList() []string
- func (t *SpockDiffTask) GetNodes() string
- func (t *SpockDiffTask) RunChecks(skipValidation bool) error
- func (t *SpockDiffTask) SetClusterNodes(cn []map[string]any)
- func (t *SpockDiffTask) SetDBName(name string)
- func (t *SpockDiffTask) SetDatabase(db types.Database)
- func (t *SpockDiffTask) SetNodeList(nl []string)
- func (t *SpockDiffTask) Validate() error
- type SpockNodeConfig
- type TableDiffTask
- func (t *TableDiffTask) AddPrimaryKeyToDiffSummary()
- func (t *TableDiffTask) CheckColumnSize() error
- func (t *TableDiffTask) CloneForSchedule(ctx context.Context) *TableDiffTask
- func (t *TableDiffTask) ExecuteRerunTask() error
- func (t *TableDiffTask) ExecuteTask() (err error)
- func (t *TableDiffTask) GetClusterName() string
- func (t *TableDiffTask) GetClusterNodes() []map[string]any
- func (t *TableDiffTask) GetDBName() string
- func (t *TableDiffTask) GetNodeList() []string
- func (t *TableDiffTask) GetNodes() string
- func (t *TableDiffTask) RunChecks(skipValidation bool) (err error)
- func (t *TableDiffTask) SetClusterNodes(cn []map[string]any)
- func (t *TableDiffTask) SetDBName(name string)
- func (t *TableDiffTask) SetDatabase(db types.Database)
- func (t *TableDiffTask) SetNodeList(nl []string)
- func (t *TableDiffTask) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDiffFileFormat ¶
func CheckDiffFileFormat(filePath string, task *TableDiffTask) error
func RepsetDiff ¶
func RepsetDiff(task *RepsetDiffCmd) (err error)
Types ¶
type HashResult ¶
type HashResult struct {
// contains filtered or unexported fields
}
type NodeComparisonReport ¶
type NodeDiff ¶
type NodeDiff struct {
MissingObjects SchemaObjects `json:"missing_objects"`
ExtraObjects SchemaObjects `json:"extra_objects"`
}
type NodeSchemaReport ¶
type NodeSchemaReport struct {
NodeName string `json:"node_name"`
Objects SchemaObjects `json:"objects"`
}
type RangeResults ¶
type RangeResults map[string]HashResult
type RecursiveDiffTask ¶
type RepsetDiffCmd ¶
type RepsetDiffCmd struct {
types.Task
ClusterName string
DBName string
RepsetName string
Nodes string
Quiet bool
SkipTables string
SkipFile string
ConnectionPool *pgxpool.Pool
ConcurrencyFactor int
BlockSize int
CompareUnitSize int
Output string
TableFilter string
OverrideBlockSize bool
Ctx context.Context
ClientRole string
InvokeMethod string
SkipDBUpdate bool
TaskStore *taskstore.Store
TaskStorePath string
// contains filtered or unexported fields
}
func NewRepsetDiffTask ¶
func NewRepsetDiffTask() *RepsetDiffCmd
func (*RepsetDiffCmd) CloneForSchedule ¶
func (task *RepsetDiffCmd) CloneForSchedule(ctx context.Context) *RepsetDiffCmd
func (*RepsetDiffCmd) GetClusterName ¶
func (c *RepsetDiffCmd) GetClusterName() string
func (*RepsetDiffCmd) GetClusterNodes ¶
func (c *RepsetDiffCmd) GetClusterNodes() []map[string]any
func (*RepsetDiffCmd) GetDBName ¶
func (c *RepsetDiffCmd) GetDBName() string
func (*RepsetDiffCmd) GetNodeList ¶
func (c *RepsetDiffCmd) GetNodeList() []string
func (*RepsetDiffCmd) GetNodes ¶
func (c *RepsetDiffCmd) GetNodes() string
func (*RepsetDiffCmd) RunChecks ¶
func (c *RepsetDiffCmd) RunChecks(skipValidation bool) error
func (*RepsetDiffCmd) SetClusterNodes ¶
func (c *RepsetDiffCmd) SetClusterNodes(cn []map[string]any)
func (*RepsetDiffCmd) SetDBName ¶
func (c *RepsetDiffCmd) SetDBName(name string)
func (*RepsetDiffCmd) SetDatabase ¶
func (c *RepsetDiffCmd) SetDatabase(db types.Database)
func (*RepsetDiffCmd) SetNodeList ¶
func (c *RepsetDiffCmd) SetNodeList(nodes []string)
func (*RepsetDiffCmd) Validate ¶
func (c *RepsetDiffCmd) Validate() error
type SchemaDiffCmd ¶
type SchemaDiffCmd struct {
types.Task
ClusterName string
DBName string
SchemaName string
Nodes string
Quiet bool
SkipTables string
SkipFile string
DDLOnly bool
ConnectionPool *pgxpool.Pool
ConcurrencyFactor int
BlockSize int
CompareUnitSize int
Output string
TableFilter string
OverrideBlockSize bool
Ctx context.Context
SkipDBUpdate bool
TaskStore *taskstore.Store
TaskStorePath string
// contains filtered or unexported fields
}
func NewSchemaDiffTask ¶
func NewSchemaDiffTask() *SchemaDiffCmd
func (*SchemaDiffCmd) CloneForSchedule ¶
func (task *SchemaDiffCmd) CloneForSchedule(ctx context.Context) *SchemaDiffCmd
func (*SchemaDiffCmd) GetClusterName ¶
func (c *SchemaDiffCmd) GetClusterName() string
func (*SchemaDiffCmd) GetClusterNodes ¶
func (c *SchemaDiffCmd) GetClusterNodes() []map[string]any
func (*SchemaDiffCmd) GetDBName ¶
func (c *SchemaDiffCmd) GetDBName() string
func (*SchemaDiffCmd) GetNodeList ¶
func (c *SchemaDiffCmd) GetNodeList() []string
func (*SchemaDiffCmd) GetNodes ¶
func (c *SchemaDiffCmd) GetNodes() string
func (*SchemaDiffCmd) RunChecks ¶
func (c *SchemaDiffCmd) RunChecks(skipValidation bool) error
func (*SchemaDiffCmd) SchemaTableDiff ¶
func (task *SchemaDiffCmd) SchemaTableDiff() (err error)
func (*SchemaDiffCmd) SetClusterNodes ¶
func (c *SchemaDiffCmd) SetClusterNodes(cn []map[string]any)
func (*SchemaDiffCmd) SetDBName ¶
func (c *SchemaDiffCmd) SetDBName(name string)
func (*SchemaDiffCmd) SetDatabase ¶
func (c *SchemaDiffCmd) SetDatabase(db types.Database)
func (*SchemaDiffCmd) SetNodeList ¶
func (c *SchemaDiffCmd) SetNodeList(nodes []string)
func (*SchemaDiffCmd) Validate ¶
func (c *SchemaDiffCmd) Validate() error
type SchemaObjects ¶
type SchemaObjects struct {
Tables []string `json:"tables"`
Views []string `json:"views"`
Functions []string `json:"functions"`
Indices []string `json:"indices"`
}
func (SchemaObjects) IsEmpty ¶
func (so SchemaObjects) IsEmpty() bool
type SpockDiffTask ¶
type SpockDiffTask struct {
types.Task
types.DerivedFields
DBName string
Nodes string
Output string
ClientRole string
InvokeMethod string
Pools map[string]*pgxpool.Pool
DiffResult *types.SpockDiffOutput
DiffFilePath string
SkipDBUpdate bool
TaskStore *taskstore.Store
TaskStorePath string
Ctx context.Context
}
SpockDiffTask defines the task for comparing spock metadata across nodes.
func NewSpockDiffTask ¶
func NewSpockDiffTask() *SpockDiffTask
func (*SpockDiffTask) ExecuteTask ¶
func (t *SpockDiffTask) ExecuteTask() (err error)
func (*SpockDiffTask) GetClusterName ¶
func (t *SpockDiffTask) GetClusterName() string
Implement ClusterConfigProvider interface for SpockDiffTask
func (*SpockDiffTask) GetClusterNodes ¶
func (t *SpockDiffTask) GetClusterNodes() []map[string]any
func (*SpockDiffTask) GetDBName ¶
func (t *SpockDiffTask) GetDBName() string
func (*SpockDiffTask) GetNodeList ¶
func (t *SpockDiffTask) GetNodeList() []string
func (*SpockDiffTask) GetNodes ¶
func (t *SpockDiffTask) GetNodes() string
func (*SpockDiffTask) RunChecks ¶
func (t *SpockDiffTask) RunChecks(skipValidation bool) error
func (*SpockDiffTask) SetClusterNodes ¶
func (t *SpockDiffTask) SetClusterNodes(cn []map[string]any)
func (*SpockDiffTask) SetDBName ¶
func (t *SpockDiffTask) SetDBName(name string)
func (*SpockDiffTask) SetDatabase ¶
func (t *SpockDiffTask) SetDatabase(db types.Database)
func (*SpockDiffTask) SetNodeList ¶
func (t *SpockDiffTask) SetNodeList(nl []string)
func (*SpockDiffTask) Validate ¶
func (t *SpockDiffTask) Validate() error
type SpockNodeConfig ¶
type SpockNodeConfig struct {
NodeName string `json:"node_name"`
Subscriptions []types.SpockSubscription `json:"subscriptions"`
RepSetInfo []types.SpockRepSetInfo `json:"rep_set_info"`
Hints []string `json:"hints"`
}
SpockNodeConfig aggregates all spock configuration for a single node.
type TableDiffTask ¶
type TableDiffTask struct {
types.Task
types.DerivedFields
QualifiedTableName string
DBName string
Nodes string
BaseTable string
FilteredViewName string
FilteredViewCreated bool
BlockSize int
ConcurrencyFactor int
Output string
TableFilter string
QuietMode bool
AgainstOrigin string
Until string
EffectiveFilter string
Mode string
OverrideBlockSize bool
DiffFilePath string
InvokeMethod string
ClientRole string
EnsurePgcrypto bool
DiffSummary map[string]string
SkipDBUpdate bool
TaskStore *taskstore.Store
TaskStorePath string
Pools map[string]*pgxpool.Pool
SpockNodeNames map[string]string
CompareUnitSize int
MaxDiffRows int64
DiffResult types.DiffOutput
Ctx context.Context
// contains filtered or unexported fields
}
func NewTableDiffTask ¶
func NewTableDiffTask() *TableDiffTask
func (*TableDiffTask) AddPrimaryKeyToDiffSummary ¶
func (t *TableDiffTask) AddPrimaryKeyToDiffSummary()
func (*TableDiffTask) CheckColumnSize ¶
func (t *TableDiffTask) CheckColumnSize() error
func (*TableDiffTask) CloneForSchedule ¶
func (t *TableDiffTask) CloneForSchedule(ctx context.Context) *TableDiffTask
func (*TableDiffTask) ExecuteRerunTask ¶
func (t *TableDiffTask) ExecuteRerunTask() error
func (*TableDiffTask) ExecuteTask ¶
func (t *TableDiffTask) ExecuteTask() (err error)
func (*TableDiffTask) GetClusterName ¶
func (t *TableDiffTask) GetClusterName() string
Implement ClusterConfigProvider interface for TableDiffTask
func (*TableDiffTask) GetClusterNodes ¶
func (t *TableDiffTask) GetClusterNodes() []map[string]any
func (*TableDiffTask) GetDBName ¶
func (t *TableDiffTask) GetDBName() string
func (*TableDiffTask) GetNodeList ¶
func (t *TableDiffTask) GetNodeList() []string
func (*TableDiffTask) GetNodes ¶
func (t *TableDiffTask) GetNodes() string
func (*TableDiffTask) RunChecks ¶
func (t *TableDiffTask) RunChecks(skipValidation bool) (err error)
func (*TableDiffTask) SetClusterNodes ¶
func (t *TableDiffTask) SetClusterNodes(cn []map[string]any)
func (*TableDiffTask) SetDBName ¶
func (t *TableDiffTask) SetDBName(name string)
func (*TableDiffTask) SetDatabase ¶
func (t *TableDiffTask) SetDatabase(db types.Database)
func (*TableDiffTask) SetNodeList ¶
func (t *TableDiffTask) SetNodeList(nl []string)
func (*TableDiffTask) Validate ¶
func (t *TableDiffTask) Validate() error
Click to show internal directories.
Click to hide internal directories.