Documentation
¶
Index ¶
- type DeleteLogsRequest
- type Log
- type LogHelper
- func (l *LogHelper) AppendRecords(ctx context.Context, request *solaris.AppendRecordsRequest) (*solaris.AppendRecordsResult, error)
- func (l *LogHelper) CountRecords(ctx context.Context, request QueryRecordsRequest) (uint64, uint64, error)
- func (l *LogHelper) QueryRecords(ctx context.Context, request QueryRecordsRequest) ([]*solaris.Record, bool, error)
- type Logs
- type QueryLogsRequest
- type QueryRecordsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteLogsRequest ¶
type DeleteLogsRequest struct { Condition string // IDs is the list of Log IDs should be deleted. IDs []string // MarkOnly allows not to delete the records physically, but mark it for deletion MarkOnly bool }
DeleteLogsRequest specifies the DeleteLogs parameters
type Log ¶
type Log interface { // AppendRecords allows to insert records into the log by its ID AppendRecords(ctx context.Context, request *solaris.AppendRecordsRequest) (*solaris.AppendRecordsResult, error) // QueryRecords allows to retrieve records by the request. The function returns the selected records and the flag, // that more records potentially available for the read QueryRecords(ctx context.Context, request QueryRecordsRequest) ([]*solaris.Record, bool, error) // CountRecords count total number for records in the log and number of records after (before) // specified record ID which match the request condition. Returned values are (total, count, error). CountRecords(ctx context.Context, request QueryRecordsRequest) (uint64, uint64, error) }
Log interface exposes an API for working with a Log records.
type LogHelper ¶
type LogHelper struct {
// contains filtered or unexported fields
}
func NewLogHelper ¶
func NewLogHelper() *LogHelper
func (*LogHelper) AppendRecords ¶
func (*LogHelper) CountRecords ¶ added in v0.22.0
func (*LogHelper) QueryRecords ¶
type Logs ¶
type Logs interface { // CreateLog creates a new log and returns its descriptor with the new ID CreateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error) // GetLogByID returns Log by its ID. It returns the errors.ErrNotExist if the log is marked for delete, // or it doesn't exist GetLogByID(ctx context.Context, id string) (*solaris.Log, error) // UpdateLog update the Log object information. The Log is matched by the log ID UpdateLog(ctx context.Context, log *solaris.Log) (*solaris.Log, error) // QueryLogs returns the list of Log objects matched to the query request QueryLogs(ctx context.Context, qr QueryLogsRequest) (*solaris.QueryLogsResult, error) // DeleteLogs allows to either mark or delete logs permanently DeleteLogs(ctx context.Context, request DeleteLogsRequest) (*solaris.DeleteLogsResult, error) }
Logs provides an interface to manage the logs meta-information
type QueryLogsRequest ¶
type QueryLogsRequest struct { Condition string // IDs is the list of Log IDs should be selected. If the value is not empty, the Condition field is disregarded IDs []string // Deleted search between deleted Deleted bool Page string Limit int64 }
QueryLogsRequest is used for selecting list of known logs
type QueryRecordsRequest ¶
type QueryRecordsRequest struct { // Condition defines the filtering constrains Condition string // LogID where records should be read LogID string // descending specifies that the result should be sorted in the descending order Descending bool // StartID provides the first record ID it can be read (inclusive) StartID string // limit contains the number of records to be returned Limit int64 }
Click to show internal directories.
Click to hide internal directories.