poller

package
v1.1.82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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) Start

func (p *PollClient) Start() error

Start the polling client

func (*PollClient) Status

func (p *PollClient) Status() error

Status returns an error if the poller is not running

func (*PollClient) Stop

func (p *PollClient) Stop()

Stop stops the streamer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL