Documentation ¶
Overview ¶
Package bleve provides tools for using Bolt as a standard persistence layer for services.
Index ¶
- Constants
- Variables
- func NewDAO(driver string, dsn string, prefix string) (dao.DAO, error)
- func NewIndexer(rd dao.DAO) (dao.IndexDAO, error)
- type BleveConfig
- type DAO
- type Handler
- type IndexDAO
- type Indexer
- func (s *Indexer) Close() 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, ...) (chan interface{}, error)
- func (s *Indexer) Flush(c context.Context) error
- func (s *Indexer) Init(cfg configx.Values) error
- func (s *Indexer) InsertOne(ctx context.Context, data interface{}) error
- func (s *Indexer) Open(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
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) GetConn ¶
func (b *BleveConfig) GetConn() dao.Conn
func (*BleveConfig) SetMaxConnectionsForWeight ¶
func (b *BleveConfig) SetMaxConnectionsForWeight(_ int)
type DAO ¶
type DAO interface { dao.DAO BleveConfig() *BleveConfig }
DAO defines the functions specific to the boltdb dao
type Handler ¶
Handler for the main functions of the DAO
func (*Handler) BleveConfig ¶
func (h *Handler) BleveConfig() *BleveConfig
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) 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)
Click to show internal directories.
Click to hide internal directories.