Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manifold ¶
func Manifold(config ManifoldConfig) dependency.Manifold
Manifold returns a dependency manifold that runs the changestream worker, using the resource names defined in the supplied config.
func NewWorker ¶
func NewWorker(cfg WorkerConfig) (worker.Worker, error)
Types ¶
type DBGetter ¶
type DBGetter = coredatabase.DBGetter
DBGetter describes the ability to supply a sql.DB reference for a particular database.
type ManifoldConfig ¶
type ManifoldConfig struct { DBAccessor string Clock clock.Clock Logger logger.Logger NewWorker NewWorkerFn }
ManifoldConfig defines the names of the manifolds on which a Manifold will depend.
func (ManifoldConfig) Validate ¶
func (cfg ManifoldConfig) Validate() error
type ModelNamespace ¶
ModelNamespace represents a model and the associated DQlite namespace that it uses.
type NewWorkerFn ¶
type NewWorkerFn = func(WorkerConfig) (worker.Worker, error)
NewWorkerFn is an alias function that allows the creation of EventQueueWorker.
type Pruner ¶
type Pruner struct {
// contains filtered or unexported fields
}
Pruner defines a worker that will truncate the change log.
type Watermark ¶
type Watermark struct { ControllerID string `db:"controller_id"` LowerBound int64 `db:"lower_bound"` UpdatedAt time.Time `db:"updated_at"` }
Watermark represents a row from the change_log_witness table.
type WorkerConfig ¶
WorkerConfig encapsulates the configuration options for the changestream worker.
func (*WorkerConfig) Validate ¶
func (c *WorkerConfig) Validate() error
Validate ensures that the config values are valid.