Versions in this module Expand all Collapse all v0 v0.2.1 Apr 2, 2026 v0.2.0 Apr 2, 2026 v0.1.0 Apr 1, 2026 Changes in this version + func ApplyMutation(ctx context.Context, engramAPI string, m RemoteMutation) error + func ConnectPG(ctx context.Context, dsn string) (*pgx.Conn, error) + func Pull(ctx context.Context, pgConn *pgx.Conn, cfg *config.Config, logger *slog.Logger) (applied int, cursor int64, err error) + func Push(ctx context.Context, sqliteDB *sql.DB, pgConn *pgx.Conn, cfg *config.Config, ...) (pushed int, highWater int64, err error) + func PushCursorFile() string + func ReadCursor(ctx context.Context, pgConn *pgx.Conn, machineID string) (int64, error) + func ReadPushCursor(path string) (int64, error) + func SDNotify(state string) bool + func UpdateCursor(ctx context.Context, pgConn *pgx.Conn, machineID string, seq int64) error + func WatchdogLoop(ctx context.Context) + func WritePushCursor(path string, seq int64) error + type Daemon struct + func NewDaemon(cfg *config.Config, sqliteDB *sql.DB, dsn string, logger *slog.Logger) *Daemon + func (d *Daemon) Run(ctx context.Context) error + type Mutation struct + Entity string + EntityKey string + OccurredAt string + Op string + Payload string + Project string + Seq int64 + Source string + TargetKey string + func ReadMutationsFromSQLite(db *sql.DB, afterSeq int64) ([]Mutation, error) + type RemoteMutation struct + Entity string + EntityKey string + ID int64 + OccurredAt time.Time + Op string + Payload json.RawMessage + Project string + Scope string + SourceMachine string + SourceSeq int64 + func FetchMutations(ctx context.Context, pgConn *pgx.Conn, cfg *config.Config, afterSeq int64) ([]RemoteMutation, error)