Documentation ¶
Index ¶
- type BulkIndex
- type Metrics
- type NatsConfig
- type Option
- func SetBulkIndexer(bi esutil.BulkIndexer, direct bool) Option
- func SetDisableMetrics(disable bool) Option
- func SetLogger(log zerolog.Logger) Option
- func SetNatsConfiguration(ncfg *NatsConfig) Option
- func SetOrganisationService(org *organization.Service) Option
- func SetOrphanWait(wait int) Option
- func SetPostHookService(hooks ...domain.PostHookService) Option
- func WithDefaultMessageHandle() Option
- type Service
- func (s *Service) AddPostHook(hook domain.PostHookService) error
- func (s *Service) BulkIndexStats() esutil.BulkIndexerStats
- func (s *Service) Metrics() Metrics
- func (s *Service) Publish(ctx context.Context, messages ...*domainpb.IndexMessage) error
- func (s *Service) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Service) Shutdown(ctx context.Context) error
- func (s *Service) Start(ctx context.Context, workers int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BulkIndex ¶
type BulkIndex interface {
Publish(ctx context.Context, message ...*domainpb.IndexMessage) error
}
type NatsConfig ¶
type Option ¶
func SetBulkIndexer ¶
func SetBulkIndexer(bi esutil.BulkIndexer, direct bool) Option
func SetDisableMetrics ¶ added in v0.3.0
func SetNatsConfiguration ¶
func SetNatsConfiguration(ncfg *NatsConfig) Option
func SetOrganisationService ¶ added in v0.3.0
func SetOrganisationService(org *organization.Service) Option
func SetOrphanWait ¶ added in v0.2.0
func SetPostHookService ¶ added in v0.2.0
func SetPostHookService(hooks ...domain.PostHookService) Option
func WithDefaultMessageHandle ¶
func WithDefaultMessageHandle() Option
type Service ¶
type Service struct { MsgHandler func(ctx context.Context, m *domainpb.IndexMessage) error // contains filtered or unexported fields }
func NewService ¶
func (*Service) AddPostHook ¶ added in v0.2.0
func (s *Service) AddPostHook(hook domain.PostHookService) error
AddPostHook adds posthook to the indexing service
func (*Service) BulkIndexStats ¶
func (s *Service) BulkIndexStats() esutil.BulkIndexerStats
Click to show internal directories.
Click to hide internal directories.