Documentation
¶
Index ¶
- func DefaultGUCs() map[string]any
- func DefaultTunableGUCs(memBytes uint64, cpus float64, clusterSize int) map[string]any
- func ReplicationSlotName(databaseName, providerName, subscriberName string) string
- func SnowflakeLolorGUCs(nodeOrdinal int) (map[string]any, error)
- func Spock4DefaultGUCs() map[string]any
- type BuiltinRoleOptions
- type ConditionalStatement
- func CreateDatabase(name string) ConditionalStatement
- func CreateReplicationSlot(databaseName, providerNode, subscriberNode string) ConditionalStatement
- func CreateSubscription(providerName, subscriberName string, providerDSN *DSN, disabled bool, ...) ConditionalStatement
- func EnableSubscription(providerNode, subscriberNode string, disabled bool) ConditionalStatement
- func RenameDB(oldName, newName string) ConditionalStatement
- type DSN
- type Executor
- type IStatement
- type Query
- func CurrentReplicationSlotLSN(databaseName, providerNode, subscriberNode string) Query[string]
- func GetPostgresVersion() Query[string]
- func GetReplicationSetTables() Query[ReplicationSetTable]
- func GetReplicationSets() Query[ReplicationSet]
- func GetReplicationSlotLSNFromCommitTS(databaseName, providerNode, subscriberNode string, commitTS time.Time) Query[string]
- func GetSpockReadOnly() Query[string]
- func GetSpockVersion() Query[string]
- func GetSubscriptionStatuses() Query[SubscriptionStatus]
- func IsSpockEnabled() Query[bool]
- func LagTrackerCommitTimestamp(originNode, receiverNode string) Query[time.Time]
- func ReplicationSlotNeedsCreate(databaseName, providerNode, subscriberNode string) Query[bool]
- func SubscriptionDsnNeedsUpdate(providerName, subscriberName string, providerDSN *DSN) Query[bool]
- func SubscriptionNeedsCreate(providerName, subscriberName string) Query[bool]
- func SubscriptionNeedsEnable(providerName, subscriberName string, disabled bool) Query[bool]
- func SyncEvent() Query[string]
- type ReplicationSet
- type ReplicationSetTable
- type Statement
- func AddReplicationSetTable(setName string, relOID uint32, columns []string, rowFilter string, sync bool, ...) Statement
- func AdvanceReplicationSlotToLSN(databaseName, providerNode, subscriberNode string, targetLSN string) Statement
- func CreateReplicationSet(r ReplicationSet) Statement
- func DropAllSubscriptions() Statement
- func DropSubscription(providerName, subscriberName string) Statement
- func EnableRepairMode() Statement
- func TerminateOtherConnections(dbName string) Statement
- func WaitForSyncEvent(originNode, lsn string, timeoutSeconds int) Statement
- type Statements
- func CreateApplicationReadOnlyRole(opts BuiltinRoleOptions) Statements
- func CreateApplicationRole(opts BuiltinRoleOptions) Statements
- func CreateBuiltInRoles(opts BuiltinRoleOptions) (Statements, error)
- func CreatePgEdgeSuperuserRole(opts BuiltinRoleOptions) (Statements, error)
- func CreateUserRole(opts UserRoleOptions) (Statements, error)
- func DropSpockAndCleanupSlots(dbName string) Statements
- func InitializePgEdgeExtensions(nodeName string, dsn *DSN) Statements
- func RestoreReplicationSets(sets []ReplicationSet, tabs []ReplicationSetTable) Statements
- type SubscriptionStatus
- type UserRoleOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGUCs ¶
func DefaultTunableGUCs ¶
func ReplicationSlotName ¶
func Spock4DefaultGUCs ¶
Types ¶
type BuiltinRoleOptions ¶
func (BuiltinRoleOptions) Schemas ¶
func (o BuiltinRoleOptions) Schemas() []string
type ConditionalStatement ¶
type ConditionalStatement struct {
If Query[bool]
Then IStatement
Else IStatement
}
func CreateDatabase ¶
func CreateDatabase(name string) ConditionalStatement
func CreateReplicationSlot ¶
func CreateReplicationSlot(databaseName, providerNode, subscriberNode string) ConditionalStatement
func CreateSubscription ¶
func EnableSubscription ¶
func EnableSubscription(providerNode, subscriberNode string, disabled bool) ConditionalStatement
func RenameDB ¶
func RenameDB(oldName, newName string) ConditionalStatement
type DSN ¶
type Query ¶
func GetPostgresVersion ¶
func GetReplicationSetTables ¶
func GetReplicationSetTables() Query[ReplicationSetTable]
func GetReplicationSets ¶
func GetReplicationSets() Query[ReplicationSet]
func GetSpockReadOnly ¶
func GetSpockVersion ¶
func GetSubscriptionStatuses ¶
func GetSubscriptionStatuses() Query[SubscriptionStatus]
func IsSpockEnabled ¶
func SubscriptionNeedsCreate ¶
func SubscriptionNeedsEnable ¶
type ReplicationSet ¶
type ReplicationSetTable ¶
type Statement ¶
func AddReplicationSetTable ¶
func AddReplicationSetTable( setName string, relOID uint32, columns []string, rowFilter string, sync bool, includePartitions bool, ) Statement
https://docs.pgedge.com/spock_ext/spock_functions/functions/spock_repset_add_table
func CreateReplicationSet ¶
func CreateReplicationSet(r ReplicationSet) Statement
https://docs.pgedge.com/spock_ext/spock_functions/functions/spock_repset_create
func DropAllSubscriptions ¶
func DropAllSubscriptions() Statement
func DropSubscription ¶
func EnableRepairMode ¶
func EnableRepairMode() Statement
func WaitForSyncEvent ¶
type Statements ¶
type Statements []IStatement
func CreateApplicationReadOnlyRole ¶
func CreateApplicationReadOnlyRole(opts BuiltinRoleOptions) Statements
func CreateApplicationRole ¶
func CreateApplicationRole(opts BuiltinRoleOptions) Statements
func CreateBuiltInRoles ¶
func CreateBuiltInRoles(opts BuiltinRoleOptions) (Statements, error)
func CreatePgEdgeSuperuserRole ¶
func CreatePgEdgeSuperuserRole(opts BuiltinRoleOptions) (Statements, error)
func CreateUserRole ¶
func CreateUserRole(opts UserRoleOptions) (Statements, error)
func DropSpockAndCleanupSlots ¶
func DropSpockAndCleanupSlots(dbName string) Statements
func InitializePgEdgeExtensions ¶
func InitializePgEdgeExtensions(nodeName string, dsn *DSN) Statements
func RestoreReplicationSets ¶
func RestoreReplicationSets(sets []ReplicationSet, tabs []ReplicationSetTable) Statements
type SubscriptionStatus ¶
type SubscriptionStatus struct {
SubscriptionName string `json:"subscription_name"`
Status string `json:"status"`
ProviderNode string `json:"provider_node"`
ProviderDSN string `json:"provider_dsn"`
SlotName string `json:"slot_name"`
ReplicationSets []string `json:"replication_sets"`
ForwardOrigins []string `json:"forward_origins"`
}
Click to show internal directories.
Click to hide internal directories.