Documentation
¶
Index ¶
- Variables
- type BatchBufferSink
- type CircuitBreakerSink
- type RetrySink
- func (s *RetrySink) DiscoverColumns(ctx context.Context, table string) ([]hermod.ColumnInfo, error)
- func (s *RetrySink) DiscoverDatabases(ctx context.Context) ([]string, error)
- func (s *RetrySink) DiscoverTables(ctx context.Context) ([]string, error)
- func (s *RetrySink) ExecuteSQL(ctx context.Context, query string) ([]map[string]any, error)
- func (s *RetrySink) Write(ctx context.Context, msg hermod.Message) error
- func (s *RetrySink) WriteBatch(ctx context.Context, msgs []hermod.Message) error
- type TracingSink
- func (s *TracingSink) DiscoverColumns(ctx context.Context, table string) ([]hermod.ColumnInfo, error)
- func (s *TracingSink) DiscoverDatabases(ctx context.Context) ([]string, error)
- func (s *TracingSink) DiscoverTables(ctx context.Context) ([]string, error)
- func (s *TracingSink) ExecuteSQL(ctx context.Context, query string) ([]map[string]any, error)
- func (s *TracingSink) Write(ctx context.Context, msg hermod.Message) error
- func (s *TracingSink) WriteBatch(ctx context.Context, msgs []hermod.Message) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCircuitOpen = errors.New("circuit breaker is open")
ErrCircuitOpen is returned when the circuit breaker is open and rejecting requests.
Functions ¶
This section is empty.
Types ¶
type BatchBufferSink ¶
BatchBufferSink coalesces messages before writing to the underlying sink.
func NewBatchBufferSink ¶
func (*BatchBufferSink) Close ¶
func (s *BatchBufferSink) Close() error
type CircuitBreakerSink ¶
func NewCircuitBreakerSink ¶
func (*CircuitBreakerSink) WriteBatch ¶
WriteBatch routes batch writes through the circuit breaker. Without this method the embedded BatchSink's WriteBatch would be promoted directly, bypassing the breaker entirely.
type RetrySink ¶
RetrySink wraps a Sink and adds retry logic.
func NewRetrySink ¶
func (*RetrySink) DiscoverColumns ¶
func (*RetrySink) DiscoverDatabases ¶
func (*RetrySink) DiscoverTables ¶
func (*RetrySink) ExecuteSQL ¶
type TracingSink ¶
TracingSink wraps a Sink and adds OpenTelemetry tracing.
func NewTracingSink ¶
func NewTracingSink(s hermod.Sink, sinkID string) *TracingSink
func (*TracingSink) DiscoverColumns ¶
func (s *TracingSink) DiscoverColumns(ctx context.Context, table string) ([]hermod.ColumnInfo, error)
func (*TracingSink) DiscoverDatabases ¶
func (s *TracingSink) DiscoverDatabases(ctx context.Context) ([]string, error)
func (*TracingSink) DiscoverTables ¶
func (s *TracingSink) DiscoverTables(ctx context.Context) ([]string, error)
func (*TracingSink) ExecuteSQL ¶
func (*TracingSink) WriteBatch ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package txgroup writes to several sinks inside one distributed transaction.
|
Package txgroup writes to several sinks inside one distributed transaction. |
Click to show internal directories.
Click to hide internal directories.