factories

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCapacity      = 10000
	DefaultFlushInterval = time.Second
	DefaultRetryDelay    = 100 * time.Millisecond
	DefaultRetryTimes    = 1
)

Variables

This section is empty.

Functions

func ExternalDataSynchronization

func ExternalDataSynchronization() DataSynchronizerFactory

func ExternalEventTrack

func ExternalEventTrack() InsightProcessorFactory

Types

type InMemoryStorageBuilder

type InMemoryStorageBuilder struct{}

func NewInMemoryStorageBuilder

func NewInMemoryStorageBuilder() InMemoryStorageBuilder

func (InMemoryStorageBuilder) CreateDataStorage

func (i InMemoryStorageBuilder) CreateDataStorage(Context) (DataStorage, error)

type InsightProcessorBuilder

type InsightProcessorBuilder struct {
	// contains filtered or unexported fields
}

InsightProcessorBuilder factory to create default implementation of interfaces.InsightProcessor

func NewInsightProcessorBuilder

func NewInsightProcessorBuilder() *InsightProcessorBuilder

NewInsightProcessorBuilder creates an instance of InsightProcessorBuilder

func (*InsightProcessorBuilder) Capacity

func (i *InsightProcessorBuilder) Capacity(capacity int) *InsightProcessorBuilder

Capacity sets the inbox capacity

func (*InsightProcessorBuilder) CreateInsightEventSender

func (i *InsightProcessorBuilder) CreateInsightEventSender(context Context) (Sender, error)

CreateInsightEventSender creates an instance of interfaces.Sender

func (*InsightProcessorBuilder) CreateInsightProcessor

func (i *InsightProcessorBuilder) CreateInsightProcessor(context Context) (InsightProcessor, error)

CreateInsightProcessor creates an instance of interfaces.InsightProcessor

func (*InsightProcessorBuilder) FlushInterval

func (i *InsightProcessorBuilder) FlushInterval(flushInterval time.Duration) *InsightProcessorBuilder

FlushInterval sets the interval of flush message

func (*InsightProcessorBuilder) MaxRetryTimes

func (i *InsightProcessorBuilder) MaxRetryTimes(maxRetryTimes int) *InsightProcessorBuilder

MaxRetryTimes sets max retry times for a failed event sending

func (*InsightProcessorBuilder) RetryInterval

func (i *InsightProcessorBuilder) RetryInterval(retryInterval time.Duration) *InsightProcessorBuilder

RetryInterval sets the time to wait for next retry if the last sending events failed

type NetworkBuilder

type NetworkBuilder struct {
	// contains filtered or unexported fields
}

func NewNetworkBuilder

func NewNetworkBuilder() *NetworkBuilder

func (*NetworkBuilder) CaCert

func (n *NetworkBuilder) CaCert(caRoot string) *NetworkBuilder

func (*NetworkBuilder) CertFile

func (n *NetworkBuilder) CertFile(certFilePath string) *NetworkBuilder

func (*NetworkBuilder) ConnectTime

func (n *NetworkBuilder) ConnectTime(connectTimeout time.Duration) *NetworkBuilder

func (*NetworkBuilder) CreateNetwork

func (n *NetworkBuilder) CreateNetwork(config BasicConfig) (Network, error)

func (*NetworkBuilder) KeyFile

func (n *NetworkBuilder) KeyFile(keyFilePath string) *NetworkBuilder

func (*NetworkBuilder) ProxyURL

func (n *NetworkBuilder) ProxyURL(proxy string) *NetworkBuilder

func (*NetworkBuilder) ReadTime

func (n *NetworkBuilder) ReadTime(readTimeout time.Duration) *NetworkBuilder

type StreamingBuilder

type StreamingBuilder struct {
	// contains filtered or unexported fields
}

StreamingBuilder factory to create default implementation of interfaces.DataSynchronizer

func NewStreamingBuilder

func NewStreamingBuilder() *StreamingBuilder

NewStreamingBuilder creates an instance of StreamingBuilder

func (*StreamingBuilder) CreateDataSynchronizer

func (s *StreamingBuilder) CreateDataSynchronizer(context Context, dataUpdater DataUpdater) (DataSynchronizer, error)

CreateDataSynchronizer creates an instance of interfaces.DataSynchronizer

func (*StreamingBuilder) FirstRetryDelay

func (s *StreamingBuilder) FirstRetryDelay(firstRetryDelay time.Duration) *StreamingBuilder

FirstRetryDelay sets the time to wait for next retry if the last data synchronization failed

func (*StreamingBuilder) MaxRetryTimes

func (s *StreamingBuilder) MaxRetryTimes(maxRetryTimes int) *StreamingBuilder

MaxRetryTimes sets the max retry times for the failed data synchronization

Jump to

Keyboard shortcuts

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