Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Connection *natsconn.NatsConnection
Pool *pgxpool.Pool
Writer Writer
Live Live
StreamMaxBytes int64 // Zero preserves an existing finite limit; new streams default to 1 GiB.
AckWait time.Duration
AllowRetentionMigration bool // Only after backup/preflight and stopping all old writers.
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns every fetched message until commit/ACK, rejection or shutdown. DB and NATS connections are borrowed; their owner closes them after Shutdown.
type Writer ¶ added in v0.0.11
type Writer interface {
// On success, return one result per event in input order. A result describes
// an inserted event, a duplicate, or a rejected client. Writers must honor
// ctx; shutdown waits for their active call to exit.
Commit(ctx context.Context, logs []logstore.Event) ([]logstore.Result, error)
}
Click to show internal directories.
Click to hide internal directories.