Documentation ¶
Index ¶
Constants ¶
View Source
const CName = "consensus.consensusclient"
Variables ¶
View Source
var ( ErrWatcherExists = errors.New("watcher exists") ErrWatcherNotExists = errors.New("watcher not exists") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // AddLog adds new log to consensus servers AddLog(ctx context.Context, logId string, rec *consensusproto.RawRecordWithId) (err error) // DeleteLog deletes the log from the consensus node DeleteLog(ctx context.Context, logId string) (err error) // AddRecord adds new record to consensus servers AddRecord(ctx context.Context, logId string, rec *consensusproto.RawRecord) (record *consensusproto.RawRecordWithId, err error) // Watch starts watching to given logId and calls watcher when any relative event received Watch(logId string, w Watcher) (err error) // UnWatch stops watching given logId and removes watcher UnWatch(logId string) (err error) app.ComponentRunnable }
type Watcher ¶
type Watcher interface { AddConsensusRecords(recs []*consensusproto.RawRecordWithId) AddConsensusError(err error) }
Watcher watches new events by specified logId
Directories ¶
Path | Synopsis |
---|---|
Package mock_consensusclient is a generated GoMock package.
|
Package mock_consensusclient is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.