Documentation ¶
Index ¶
- Constants
- type Service
- type Stream
- func (s *Stream) AddRecords(logId string, records []consensus.Record) (err error)
- func (s *Stream) Close()
- func (s *Stream) LogIds() []string
- func (s *Stream) UnwatchIds(ctx context.Context, logIds []string)
- func (s *Stream) WaitLogs() []consensus.Log
- func (s *Stream) WatchIds(ctx context.Context, logIds []string)
Constants ¶
View Source
const CName = "consensus.stream"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface { // NewStream creates new stream with able to watch and unwatch log ids NewStream() *Stream app.ComponentRunnable }
Service maintains a cache for logs (receive updates from db) and creates new stream objects with able to subscribe/unsubscribe to log ids
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
Stream is a buffer that receives updates from object and gives back to a client
func (*Stream) AddRecords ¶
AddRecords adds new records to stream, called by objects
func (*Stream) UnwatchIds ¶
UnwatchIds removes given ids from subscription
Click to show internal directories.
Click to hide internal directories.