Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOpt ¶
type ClientOpt func(pc *PollClient)
ClientOpt func for setting fields on the PollClient
func WithHarvester ¶
func WithHarvester(hClient harvester.Harvest, sequence events.SequenceProvider, topicSelfLink string) ClientOpt
WithHarvester configures the polling client to use harvester
func WithOnClientStop ¶
func WithOnClientStop(cb func()) ClientOpt
WithOnClientStop func to execute when the client shuts down
func WithOnConnect ¶
func WithOnConnect() ClientOpt
WithOnConnect func to execute when a connection to central is made
type PollClient ¶
type PollClient struct {
// contains filtered or unexported fields
}
PollClient is a client for polling harvester
func NewPollClient ¶
func NewPollClient( apiClient events.APIClient, cfg config.CentralConfig, handlers []handler.Handler, options ...ClientOpt, ) (*PollClient, error)
NewPollClient creates a polling client
func (*PollClient) Healthcheck ¶
func (p *PollClient) Healthcheck(_ string) *hc.Status
Healthcheck returns a healthcheck
func (*PollClient) Status ¶
func (p *PollClient) Status() error
Status returns an error if the poller is not running
Click to show internal directories.
Click to hide internal directories.