Documentation
¶
Index ¶
- type BatchSQLSource
- func (s *BatchSQLSource) Ack(ctx context.Context, msg hermod.Message) error
- func (s *BatchSQLSource) Close() error
- func (s *BatchSQLSource) GetState() map[string]string
- func (s *BatchSQLSource) Ping(ctx context.Context) error
- func (s *BatchSQLSource) Read(ctx context.Context) (hermod.Message, error)
- func (s *BatchSQLSource) Sample(ctx context.Context, table string) (hermod.Message, error)
- func (s *BatchSQLSource) SetLogger(logger hermod.Logger)
- func (s *BatchSQLSource) SetState(state map[string]string)
- type Config
- type DBProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchSQLSource ¶
type BatchSQLSource struct {
// contains filtered or unexported fields
}
BatchSQLSource implements the hermod.Source interface for scheduled SQL queries.
func NewBatchSQLSource ¶
func NewBatchSQLSource(dbProvider DBProvider, config Config) *BatchSQLSource
NewBatchSQLSource creates a new BatchSQLSource.
func (*BatchSQLSource) Ack ¶
Ack moves the cursor to the acknowledged row's watermark — before releasing the message, whose metadata carries it.
func (*BatchSQLSource) Close ¶
func (s *BatchSQLSource) Close() error
Close stops the cron scheduler and releases resources.
func (*BatchSQLSource) GetState ¶
func (s *BatchSQLSource) GetState() map[string]string
GetState returns the current state for persistence.
func (*BatchSQLSource) Ping ¶
func (s *BatchSQLSource) Ping(ctx context.Context) error
Ping checks if the schedule is valid.
func (*BatchSQLSource) Sample ¶
Sample fetches a single record from the specified table for preview.
func (*BatchSQLSource) SetLogger ¶
func (s *BatchSQLSource) SetLogger(logger hermod.Logger)
SetLogger sets the logger for the source.
func (*BatchSQLSource) SetState ¶
func (s *BatchSQLSource) SetState(state map[string]string)
SetState sets the initial state for incremental tracking.
Click to show internal directories.
Click to hide internal directories.