Documentation ¶
Overview ¶
Package bleve provides tools for using Bolt as a standard persistence layer for services.
Index ¶
- Constants
- Variables
- func NewDAO(ctx context.Context, driver string, dsn string, prefix string) (dao.DAO, error)
- func NewIndexer(ctx context.Context, rd dao.DAO) (dao.IndexDAO, error)
- type BleveConfig
- type DAO
- type Handler
- type IndexDAO
- type Indexer
- func (s *Indexer) As(i interface{}) bool
- func (s *Indexer) Close(ctx context.Context) error
- func (s *Indexer) DeleteMany(ctx context.Context, qu interface{}) (int32, error)
- func (s *Indexer) DeleteOne(ctx context.Context, data interface{}) error
- func (s *Indexer) FindMany(ctx context.Context, query interface{}, offset, limit int32, sortFields string, ...) (chan interface{}, error)
- func (s *Indexer) Flush(c context.Context) error
- func (s *Indexer) Init(ctx context.Context, cfg configx.Values) error
- func (s *Indexer) InsertOne(ctx context.Context, data interface{}) error
- func (s *Indexer) MustBleveConfig(ctx context.Context) *BleveConfig
- func (s *Indexer) Open(c context.Context, indexPath string) error
- func (s *Indexer) Resync(ctx context.Context, logger func(string)) error
- func (s *Indexer) SetCodex(c dao.IndexCodex)
- func (s *Indexer) Stats() map[string]interface{}
- func (s *Indexer) Truncate(ctx context.Context, max int64, logger func(string)) error
- func (s *Indexer) WatchStatus() (registry.StatusWatcher, error)
Constants ¶
View Source
const ( BufferedChanSize = 10000 MinRotationSize = 68 * 1024 )
View Source
const DefaultBatchSize = 2000
View Source
const DefaultRotationSize = int64(200 * 1024 * 1024)
View Source
const Driver = "bleve"
Variables ¶
View Source
var (
UnitTestEnv = false
)
Functions ¶
Types ¶
type BleveConfig ¶
func (*BleveConfig) SetMaxConnectionsForWeight ¶
func (b *BleveConfig) SetMaxConnectionsForWeight(_ int)
type Handler ¶
Handler for the main functions of the DAO
func (*Handler) BleveConfig ¶
func (h *Handler) BleveConfig(ctx context.Context) (*BleveConfig, error)
BleveConfig returns the folder to lookup for bleve index
type Indexer ¶
type Indexer struct { DAO // contains filtered or unexported fields }
Indexer is the syslog specific implementation of the Log server
func (*Indexer) DeleteMany ¶
func (*Indexer) MustBleveConfig ¶ added in v4.0.1
func (s *Indexer) MustBleveConfig(ctx context.Context) *BleveConfig
func (*Indexer) Open ¶
Open lists all existing indexes and creates a writeable index on the active one and a composed index for searching. It calls watchInserts() to start watching for new logs
func (*Indexer) Resync ¶
Resync creates a copy of current index. It has been originally used for switching analyze format from bleve to scorch.
func (*Indexer) SetCodex ¶
func (s *Indexer) SetCodex(c dao.IndexCodex)
func (*Indexer) Truncate ¶
Truncate gathers size of existing indexes, starting from last. When max is reached it starts deleting all previous indexes.
func (*Indexer) WatchStatus ¶ added in v4.0.1
func (s *Indexer) WatchStatus() (registry.StatusWatcher, error)
Click to show internal directories.
Click to hide internal directories.