Documentation
¶
Index ¶
- func NewPostgreSQLSource(config *config.BaseConfig) (core.Source, error)
- type PostgreSQLPosition
- type PostgreSQLSource
- func (s *PostgreSQLSource) Close(ctx context.Context) error
- func (s *PostgreSQLSource) Discover(ctx context.Context) (*core.Schema, error)
- func (s *PostgreSQLSource) GetPosition() core.Position
- func (s *PostgreSQLSource) GetState() core.State
- func (s *PostgreSQLSource) Health(ctx context.Context) error
- func (s *PostgreSQLSource) Initialize(ctx context.Context, config *config.BaseConfig) error
- func (s *PostgreSQLSource) Metrics() map[string]interface{}
- func (s *PostgreSQLSource) Read(ctx context.Context) (*core.RecordStream, error)
- func (s *PostgreSQLSource) ReadBatch(ctx context.Context, batchSize int) (*core.BatchStream, error)
- func (s *PostgreSQLSource) SetPosition(position core.Position) error
- func (s *PostgreSQLSource) SetState(state core.State) error
- func (s *PostgreSQLSource) Subscribe(ctx context.Context, tables []string) (*core.ChangeStream, error)
- func (s *PostgreSQLSource) SupportsBatch() bool
- func (s *PostgreSQLSource) SupportsIncremental() bool
- func (s *PostgreSQLSource) SupportsRealtime() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgreSQLSource ¶
func NewPostgreSQLSource(config *config.BaseConfig) (core.Source, error)
NewPostgreSQLSource creates a new PostgreSQL source connector
Types ¶
type PostgreSQLPosition ¶
type PostgreSQLPosition struct {
Offset int64 `json:"offset"`
}
PostgreSQLPosition implements core.Position for PostgreSQL
func (*PostgreSQLPosition) String ¶
func (p *PostgreSQLPosition) String() string
type PostgreSQLSource ¶
type PostgreSQLSource struct {
*base.BaseConnector
// contains filtered or unexported fields
}
PostgreSQLSource implements the core.Source interface for PostgreSQL
func (*PostgreSQLSource) Close ¶
func (s *PostgreSQLSource) Close(ctx context.Context) error
Close closes the PostgreSQL connection and cleans up resources
func (*PostgreSQLSource) GetPosition ¶
func (s *PostgreSQLSource) GetPosition() core.Position
State management methods
func (*PostgreSQLSource) GetState ¶
func (s *PostgreSQLSource) GetState() core.State
func (*PostgreSQLSource) Health ¶
func (s *PostgreSQLSource) Health(ctx context.Context) error
Health returns the health status
func (*PostgreSQLSource) Initialize ¶
func (s *PostgreSQLSource) Initialize(ctx context.Context, config *config.BaseConfig) error
Initialize sets up the PostgreSQL connection and prepares for reading
func (*PostgreSQLSource) Metrics ¶
func (s *PostgreSQLSource) Metrics() map[string]interface{}
Metrics returns performance metrics
func (*PostgreSQLSource) Read ¶
func (s *PostgreSQLSource) Read(ctx context.Context) (*core.RecordStream, error)
Read returns a stream of records from PostgreSQL
func (*PostgreSQLSource) ReadBatch ¶
func (s *PostgreSQLSource) ReadBatch(ctx context.Context, batchSize int) (*core.BatchStream, error)
ReadBatch returns a stream of record batches from PostgreSQL
func (*PostgreSQLSource) SetPosition ¶
func (s *PostgreSQLSource) SetPosition(position core.Position) error
func (*PostgreSQLSource) Subscribe ¶
func (s *PostgreSQLSource) Subscribe(ctx context.Context, tables []string) (*core.ChangeStream, error)
Real-time methods (not supported)
func (*PostgreSQLSource) SupportsBatch ¶
func (s *PostgreSQLSource) SupportsBatch() bool
func (*PostgreSQLSource) SupportsIncremental ¶
func (s *PostgreSQLSource) SupportsIncremental() bool
Capability methods
func (*PostgreSQLSource) SupportsRealtime ¶
func (s *PostgreSQLSource) SupportsRealtime() bool
Click to show internal directories.
Click to hide internal directories.