Documentation ¶
Index ¶
- type DB
- func (db *DB) AddTask(id string, cancel context.CancelFunc)
- func (db *DB) CancelReport(ctx context.Context, id string) error
- func (db *DB) Close()
- func (db *DB) CreateReport(ctx context.Context, req index.Request) (*schema.Report, error)
- func (db *DB) Debug(ctx context.Context, req keyvalue.DebugRequest, ...) error
- func (db *DB) Delete(ctx context.Context) error
- func (db *DB) DeleteReport(ctx context.Context, id string) error
- func (db *DB) DeleteTask(id string)
- func (db *DB) FlushBatch()
- func (db *DB) GetFileInfo(_ context.Context, filename string) (*schema.FileInfo, error)
- func (db *DB) GetReport(ctx context.Context, id string) (*schema.Report, error)
- func (db *DB) GetStorageRef(ctx context.Context, id string) (string, error)
- func (db *DB) Index(path string) error
- func (db *DB) ListFileInfo(ctx context.Context, req index.Request, res chan<- index.FileInfoResponse) error
- func (db *DB) ListReports(ctx context.Context, req index.Request, res chan<- index.ReportResponse) error
- func (db *DB) ListStorageRef(ctx context.Context, req index.Request, res chan<- index.IdResponse) error
- func (db *DB) Resolve(ctx context.Context, warcId string) (string, error)
- func (db *DB) ResolvePath(filename string) (filePath string, err error)
- func (db *DB) SaveReport(ctx context.Context, report *schema.Report) error
- func (db *DB) Search(ctx context.Context, req index.Request, res chan<- index.CdxResponse) error
- func (db *DB) Write(rec index.Record) error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CancelReport ¶ added in v0.4.0
func (*DB) Close ¶
func (db *DB) Close()
Close stops the batch workers and closes the index databases.
func (*DB) CreateReport ¶ added in v0.4.0
func (*DB) Debug ¶ added in v0.4.0
func (db *DB) Debug(ctx context.Context, req keyvalue.DebugRequest, res chan<- keyvalue.CdxResponse) error
func (*DB) DeleteReport ¶ added in v0.4.0
func (*DB) DeleteTask ¶ added in v0.4.0
func (*DB) FlushBatch ¶ added in v0.4.0
func (db *DB) FlushBatch()
FlushBatch collects all records in the batch channel and updates the id and cdx indices.
func (*DB) GetFileInfo ¶
func (*DB) GetStorageRef ¶
func (*DB) ListFileInfo ¶
func (*DB) ListReports ¶ added in v0.4.0
func (*DB) ListStorageRef ¶
func (*DB) Resolve ¶
Resolve looks up warcId in the id index of the database and returns corresponding storageRef, or an error if not found.
func (*DB) ResolvePath ¶
ResolvePath looks up filename in file index and returns the path field.
func (*DB) SaveReport ¶ added in v0.4.0
type Option ¶
type Option func(opts *Options)
func WithBatchMaxSize ¶
func WithBatchMaxWait ¶
func WithDatabase ¶
func WithPDAddress ¶
func WithReadOnly ¶
Click to show internal directories.
Click to hide internal directories.