Documentation ¶
Index ¶
- Variables
- type EntryIterator
- type EntryStatus
- type LogEntry
- type Option
- type Store
- func (s *Store) FailLogEntriesFrom(logURL string, start uint64) error
- func (s *Store) GetFailedLogEntries(logURL string) (EntryIterator, error)
- func (s *Store) GetLogEntries(logURL string) (EntryIterator, error)
- func (s *Store) GetLogEntriesFrom(logURL string, start uint64) (EntryIterator, error)
- func (s *Store) StoreLogEntries(logURL string, start, end uint64, entries []command.LeafEntry) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDataNotFound = errors.New("data not found")
ErrDataNotFound is returned when data is not found.
Functions ¶
This section is empty.
Types ¶
type EntryIterator ¶
type EntryIterator interface { // TotalItems returns the total number of items as a result of the query. TotalItems() (int, error) // Next returns the next log entry or an ErrNotFound error if there are no more items. Next() (*command.LeafEntry, error) // Close closes the iterator. Close() error }
EntryIterator defines the query results iterator for log entry queries.
type EntryStatus ¶
type EntryStatus string
EntryStatus defines valid values for log entry status.
const ( // EntryStatusSuccess defines "success" status. EntryStatusSuccess EntryStatus = "success" // EntryStatusFailed defines "failed" status. EntryStatusFailed EntryStatus = "failed" )
type LogEntry ¶
type LogEntry struct { Index int `json:"index"` LeafEntry command.LeafEntry `json:"leafEntry"` LogURL string `json:"logUrl"` Status EntryStatus `json:"status"` }
LogEntry consists of index with log and leaf entry.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is db implementation of log entry store.
func (*Store) FailLogEntriesFrom ¶
FailLogEntriesFrom updates all log entries from start (until end) and tags them with status=failure.
func (*Store) GetFailedLogEntries ¶
func (s *Store) GetFailedLogEntries(logURL string) (EntryIterator, error)
GetFailedLogEntries retrieves failed log entries.
func (*Store) GetLogEntries ¶
func (s *Store) GetLogEntries(logURL string) (EntryIterator, error)
GetLogEntries retrieves log entries.
func (*Store) GetLogEntriesFrom ¶
func (s *Store) GetLogEntriesFrom(logURL string, start uint64) (EntryIterator, error)
GetLogEntriesFrom retrieves log entries from index start.
Click to show internal directories.
Click to hide internal directories.