Documentation ¶
Index ¶
- func Init(ctx context.Context, kbCtx libkbfs.Context, params libkbfs.InitParams, ...) (context.Context, libkbfs.Config, error)
- func Params(kbCtx libkbfs.Context, storageRoot string, uid keybase1.UID) (params libkbfs.InitParams, err error)
- type DbClosedError
- type DocDb
- type IndexedBlockDb
- func (db *IndexedBlockDb) Delete(ctx context.Context, tlfID tlf.ID, ptr data.BlockPointer) error
- func (db *IndexedBlockDb) Get(ctx context.Context, ptr data.BlockPointer) (indexVersion uint, docID string, err error)
- func (db *IndexedBlockDb) GetNextDocIDs(n int) ([]string, error)
- func (db *IndexedBlockDb) Put(ctx context.Context, tlfID tlf.ID, ptr data.BlockPointer, indexVersion uint, ...) error
- func (db *IndexedBlockDb) Shutdown(ctx context.Context)
- type IndexedTlfDb
- func (db *IndexedTlfDb) Delete(ctx context.Context, tlfID tlf.ID) error
- func (db *IndexedTlfDb) Get(ctx context.Context, tlfID tlf.ID) (indexedRev, startedRev kbfsmd.Revision, err error)
- func (db *IndexedTlfDb) Put(ctx context.Context, tlfID tlf.ID, indexedRev, startedRev kbfsmd.Revision) error
- func (db *IndexedTlfDb) Shutdown(ctx context.Context)
- type Indexer
- func (i *Indexer) FullSyncStarted(ctx context.Context, tlfID tlf.ID, rev kbfsmd.Revision, waitCh <-chan struct{})
- func (i *Indexer) Shutdown(ctx context.Context) error
- func (i *Indexer) SyncModeChanged(ctx context.Context, tlfID tlf.ID, newMode keybase1.FolderSyncMode)
- func (i *Indexer) UserChanged(ctx context.Context, oldName, newName kbname.NormalizedUsername)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(ctx context.Context, kbCtx libkbfs.Context, params libkbfs.InitParams, keybaseServiceCn libkbfs.KeybaseServiceCn, log logger.Logger, vlogLevel string) ( context.Context, libkbfs.Config, error)
Init initializes a context and a libkbfs.Config for search operations. The config should be shutdown when it is done being used.
Types ¶
type DbClosedError ¶
type DbClosedError struct {
// contains filtered or unexported fields
}
DbClosedError indicates that the DB has been closed, and thus isn't accepting any more operations.
func (DbClosedError) Error ¶
func (e DbClosedError) Error() string
Error implements the error interface for DbClosedError.
type DocDb ¶
type DocDb struct {
// contains filtered or unexported fields
}
DocDb is a database that holds metadata about indexed documents.
type IndexedBlockDb ¶
type IndexedBlockDb struct {
// contains filtered or unexported fields
}
IndexedBlockDb is a database that holds metadata about indexed blocks.
func (*IndexedBlockDb) Delete ¶
func (db *IndexedBlockDb) Delete( ctx context.Context, tlfID tlf.ID, ptr data.BlockPointer) error
Delete removes the metadata for the block pointer from the DB.
func (*IndexedBlockDb) Get ¶
func (db *IndexedBlockDb) Get( ctx context.Context, ptr data.BlockPointer) ( indexVersion uint, docID string, err error)
Get returns the version and doc ID for the given block.
func (*IndexedBlockDb) GetNextDocIDs ¶
func (db *IndexedBlockDb) GetNextDocIDs(n int) ([]string, error)
GetNextDocIDs generates and reserves the next N doc IDs.
func (*IndexedBlockDb) Put ¶
func (db *IndexedBlockDb) Put( ctx context.Context, tlfID tlf.ID, ptr data.BlockPointer, indexVersion uint, docID string) error
Put saves the version and doc ID for the given block.
func (*IndexedBlockDb) Shutdown ¶
func (db *IndexedBlockDb) Shutdown(ctx context.Context)
Shutdown closes this db.
type IndexedTlfDb ¶
type IndexedTlfDb struct {
// contains filtered or unexported fields
}
IndexedTlfDb is a database that holds metadata about indexed TLFs.
func (*IndexedTlfDb) Get ¶
func (db *IndexedTlfDb) Get( ctx context.Context, tlfID tlf.ID) ( indexedRev, startedRev kbfsmd.Revision, err error)
Get returns the revisions for the given TLF.
func (*IndexedTlfDb) Put ¶
func (db *IndexedTlfDb) Put( ctx context.Context, tlfID tlf.ID, indexedRev, startedRev kbfsmd.Revision) error
Put saves the revisions for the given TLF.
func (*IndexedTlfDb) Shutdown ¶
func (db *IndexedTlfDb) Shutdown(ctx context.Context)
Shutdown closes this db.
type Indexer ¶
type Indexer struct {
// contains filtered or unexported fields
}
Indexer can index and search KBFS TLFs.
func NewIndexer ¶
NewIndexer creates a new instance of an Indexer.
func (*Indexer) FullSyncStarted ¶
func (i *Indexer) FullSyncStarted( ctx context.Context, tlfID tlf.ID, rev kbfsmd.Revision, waitCh <-chan struct{})
FullSyncStarted implements the libkbfs.SyncedTlfObserver interface for Indexer.
func (*Indexer) SyncModeChanged ¶
func (i *Indexer) SyncModeChanged( ctx context.Context, tlfID tlf.ID, newMode keybase1.FolderSyncMode)
SyncModeChanged implements the libkbfs.SyncedTlfObserver interface for Indexer.
func (*Indexer) UserChanged ¶
func (i *Indexer) UserChanged( ctx context.Context, oldName, newName kbname.NormalizedUsername)
UserChanged implements the libfs.RemoteStatusUpdater for Indexer.