Documentation
¶
Index ¶
Constants ¶
View Source
const CName = "consensus.db"
View Source
const (
// Version2 - payloads moved to the separate collection
Version2 = 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeReceiver ¶
type Service ¶
type Service interface {
// AddLog adds new log db
AddLog(ctx context.Context, log consensus.Log) (err error)
// DeleteLog deletes the log
DeleteLog(ctx context.Context, logId string) error
// AddRecord adds new record to existing log
// returns consensuserr.ErrConflict if record didn't match or log not found
AddRecord(ctx context.Context, logId string, record consensus.Record) (err error)
// FetchLog gets log by id
FetchLog(ctx context.Context, logId, afterRecordId string) (log consensus.Log, err error)
// SetChangeReceiver sets the receiver for updates, it must be called before app.Run stage
SetChangeReceiver(receiver ChangeReceiver) (err error)
// SetDeletionId sets the last deleted log id
SetDeletionId(ctx context.Context, lastId string) (err error)
// GetDeletionId gets the last deletion log id
GetDeletionId(ctx context.Context) (lastId string, err error)
app.ComponentRunnable
}
Click to show internal directories.
Click to hide internal directories.