Documentation ¶
Index ¶
- Variables
- type FileVotesLog
- func (c *FileVotesLog) Close() error
- func (c *FileVotesLog) Get(index uint64) (string, []byte, bool)
- func (c *FileVotesLog) GetVotes(index uint64) []*entity.Vote
- func (c *FileVotesLog) Set(index uint64, key string, value []byte) error
- func (c *FileVotesLog) SetVotes(index uint64, votes []*entity.Vote) error
- type InmemVotesLog
- func (c *InmemVotesLog) Close() error
- func (c *InmemVotesLog) Get(index uint64) (string, []byte, bool)
- func (c *InmemVotesLog) GetVotes(index uint64) []*entity.Vote
- func (c *InmemVotesLog) Set(index uint64, key string, value []byte) error
- func (c *InmemVotesLog) SetVotes(index uint64, votes []*entity.Vote) error
- type Log
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExists = errors.New("msg with such index already exists")
Functions ¶
This section is empty.
Types ¶
type FileVotesLog ¶ added in v0.0.2
type FileVotesLog struct {
// contains filtered or unexported fields
}
func NewOnDiskLog ¶ added in v0.0.2
func NewOnDiskLog(dir string) (*FileVotesLog, error)
func (*FileVotesLog) Close ¶ added in v0.0.2
func (c *FileVotesLog) Close() error
func (*FileVotesLog) Get ¶ added in v0.0.2
func (c *FileVotesLog) Get(index uint64) (string, []byte, bool)
func (*FileVotesLog) GetVotes ¶ added in v0.0.2
func (c *FileVotesLog) GetVotes(index uint64) []*entity.Vote
type InmemVotesLog ¶ added in v0.0.2
type InmemVotesLog struct {
// contains filtered or unexported fields
}
func NewInmemLog ¶ added in v0.0.2
func NewInmemLog() *InmemVotesLog
func (*InmemVotesLog) Close ¶ added in v0.0.2
func (c *InmemVotesLog) Close() error
func (*InmemVotesLog) Get ¶ added in v0.0.2
func (c *InmemVotesLog) Get(index uint64) (string, []byte, bool)
func (*InmemVotesLog) GetVotes ¶ added in v0.0.2
func (c *InmemVotesLog) GetVotes(index uint64) []*entity.Vote
Click to show internal directories.
Click to hide internal directories.