harvester

package
v1.1.64 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Cfg    *Config
	Client api.Client
	URL    string
	// contains filtered or unexported fields
}

Client for connecting to harvester

func NewClient

func NewClient(cfg *Config) *Client

NewClient creates a new harvester client

func (*Client) EventCatchUp

func (h *Client) EventCatchUp(link string, events chan *proto.Event) error

EventCatchUp syncs all events

func (*Client) ReceiveSyncEvents

func (h *Client) ReceiveSyncEvents(topicSelfLink string, sequenceID int64, eventCh chan *proto.Event) (int64, error)

ReceiveSyncEvents fetches events based on the sequence id and watch topic self link, and publishes the events to the event channel

type Config

type Config struct {
	ClientTimeout    time.Duration
	Host             string
	PageSize         int
	Port             uint32
	Protocol         string
	ProxyURL         string
	SequenceProvider events.SequenceProvider
	TenantID         string
	TLSCfg           *tls.Config
	TokenGetter      func() (string, error)
	// contains filtered or unexported fields
}

Config for harvester

func NewConfig

func NewConfig(cfg config.CentralConfig, getToken auth.TokenGetter, seq events.SequenceProvider) *Config

NewConfig creates a config for harvester connections

type ErrSeqGone added in v1.1.44

type ErrSeqGone struct {
}

ErrSeqGone - error for purged sequence

func (*ErrSeqGone) Error added in v1.1.44

func (e *ErrSeqGone) Error() string

type Harvest

type Harvest interface {
	EventCatchUp(link string, events chan *proto.Event) error
	ReceiveSyncEvents(topicSelfLink string, sequenceID int64, eventCh chan *proto.Event) (int64, error)
}

Harvest is an interface for retrieving harvester events

Jump to

Keyboard shortcuts

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