Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentManager ¶
type DocumentManager interface {
Close()
StartIndexRequestHandler(handler IndexRequestHandler)
StartDocumentRequestHandler(handler DocumentRequestHandler)
}
DocumentManager connects to the letarette cluster and processes indexing requests
func StartDocumentManager ¶
func StartDocumentManager(URLs []string, options ...Option) (DocumentManager, error)
StartDocumentManager creates a DocumentManager and connects to Nats daemon
type DocumentRequestHandler ¶
type DocumentRequestHandler func(ctx context.Context, req protocol.DocumentRequest) (protocol.DocumentUpdate, error)
DocumentRequestHandler processes document requests from the letarette cluster and returns document updates.
type IndexRequestHandler ¶
type IndexRequestHandler func(ctx context.Context, req protocol.IndexUpdateRequest) (protocol.IndexUpdate, error)
IndexRequestHandler processes index update requests from the letarette cluster and returns index updates.
type Monitor ¶
type Monitor interface {
Close()
}
Monitor listens to status broadcasts from a letarette cluster
func NewMonitor ¶
func NewMonitor(URLs []string, listener MonitorListener, options ...Option) (Monitor, error)
NewMonitor - Monitor constructor
type MonitorListener ¶
type MonitorListener func(protocol.IndexStatus)
MonitorListener is a callback function receiving status broadcasts
type Option ¶
type Option func(*state)
Option is the option setter interface. See related WithXXX functions.
func WithErrorHandler ¶
WithErrorHandler sets an error handler instead of the default silent one
func WithRootCAs ¶
WithRootCAs specifies a set of root CA files for server verification
func WithSeedFile ¶
WithSeedFile specifies a seed file for Nkey authentication
func WithShardgroupSize ¶
WithShardgroupSize forces shard group size instead of using discovery
func WithTimeout ¶
WithTimeout sets search request timeout
type SearchAgent ¶
type SearchAgent interface {
Close()
Search(q string, spaces []string, pageLimit int, pageOffset int) (protocol.SearchResponse, error)
}
SearchAgent is a letarette cluster searcher
func NewSearchAgent ¶
func NewSearchAgent(URLs []string, options ...Option) (SearchAgent, error)
NewSearchAgent - SearchAgent constructor