Documentation
¶
Overview ¶
Package datasourcev2 is an internal package containing implementation types for the SDK's data source implementations (streaming, polling, etc.) and related functionality. These types are not visible from outside of the SDK.
WARNING: This particular implementation supports the upcoming flag delivery v2 format which is not publicly available.
This does not include the file data source, which is in the ldfiledata package.
Index ¶
- type PollingProcessor
- func (pp *PollingProcessor) Close() error
- func (pp *PollingProcessor) Fetch(ctx context.Context) (*subsystems.Basis, error)
- func (pp *PollingProcessor) GetBaseURI() string
- func (pp *PollingProcessor) GetFilterKey() string
- func (pp *PollingProcessor) GetPollInterval() time.Duration
- func (pp *PollingProcessor) IsInitialized() bool
- func (pp *PollingProcessor) Name() string
- func (pp *PollingProcessor) Sync(closeWhenReady chan<- struct{})
- type PollingRequester
- type StreamProcessor
- func (sp *StreamProcessor) Close() error
- func (sp *StreamProcessor) Fetch(_ context.Context) (*subsystems.Basis, error)
- func (sp *StreamProcessor) GetBaseURI() string
- func (sp *StreamProcessor) GetFilterKey() string
- func (sp *StreamProcessor) GetInitialReconnectDelay() time.Duration
- func (sp *StreamProcessor) IsInitialized() bool
- func (sp *StreamProcessor) Name() string
- func (sp *StreamProcessor) Sync(closeWhenReady chan<- struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PollingProcessor ¶
type PollingProcessor struct {
// contains filtered or unexported fields
}
PollingProcessor is the internal implementation of the polling data source.
This type is exported from internal so that the PollingDataSourceBuilder tests can verify its configuration. All other code outside of this package should interact with it only via the DataSource interface.
func NewPollingProcessor ¶
func NewPollingProcessor( context subsystems.ClientContext, dataDestination subsystems.DataDestination, statusReporter subsystems.DataSourceStatusReporter, cfg datasource.PollingConfig, ) *PollingProcessor
NewPollingProcessor creates the internal implementation of the polling data source.
func (*PollingProcessor) Close ¶
func (pp *PollingProcessor) Close() error
func (*PollingProcessor) Fetch ¶ added in v7.8.0
func (pp *PollingProcessor) Fetch(ctx context.Context) (*subsystems.Basis, error)
func (*PollingProcessor) GetBaseURI ¶
func (pp *PollingProcessor) GetBaseURI() string
GetBaseURI returns the configured polling base URI, for testing.
func (*PollingProcessor) GetFilterKey ¶
func (pp *PollingProcessor) GetFilterKey() string
GetFilterKey returns the configured filter key, for testing.
func (*PollingProcessor) GetPollInterval ¶
func (pp *PollingProcessor) GetPollInterval() time.Duration
GetPollInterval returns the configured polling interval, for testing.
func (*PollingProcessor) IsInitialized ¶
func (pp *PollingProcessor) IsInitialized() bool
func (*PollingProcessor) Name ¶ added in v7.8.0
func (pp *PollingProcessor) Name() string
func (*PollingProcessor) Sync ¶ added in v7.8.0
func (pp *PollingProcessor) Sync(closeWhenReady chan<- struct{})
type PollingRequester ¶
type PollingRequester interface {
Request(context.Context) (*fdv2proto.ChangeSet, error)
BaseURI() string
FilterKey() string
}
PollingRequester allows PollingProcessor to delegate fetching data to another component. This is useful for testing the PollingProcessor without needing to set up a test HTTP server.
type StreamProcessor ¶
type StreamProcessor struct {
// contains filtered or unexported fields
}
StreamProcessor is the internal implementation of the streaming data source.
This type is exported from internal so that the StreamingDataSourceBuilder tests can verify its configuration. All other code outside of this package should interact with it only via the DataSource interface.
func NewStreamProcessor ¶
func NewStreamProcessor( context subsystems.ClientContext, dataDestination subsystems.DataDestination, statusReporter subsystems.DataSourceStatusReporter, cfg datasource.StreamConfig, ) *StreamProcessor
NewStreamProcessor creates the internal implementation of the streaming data source.
func (*StreamProcessor) Close ¶
func (sp *StreamProcessor) Close() error
func (*StreamProcessor) Fetch ¶ added in v7.8.0
func (sp *StreamProcessor) Fetch(_ context.Context) (*subsystems.Basis, error)
func (*StreamProcessor) GetBaseURI ¶
func (sp *StreamProcessor) GetBaseURI() string
GetBaseURI returns the configured streaming base URI, for testing.
func (*StreamProcessor) GetFilterKey ¶
func (sp *StreamProcessor) GetFilterKey() string
GetFilterKey returns the configured key, for testing.
func (*StreamProcessor) GetInitialReconnectDelay ¶
func (sp *StreamProcessor) GetInitialReconnectDelay() time.Duration
GetInitialReconnectDelay returns the configured reconnect delay, for testing.
func (*StreamProcessor) IsInitialized ¶
func (sp *StreamProcessor) IsInitialized() bool
func (*StreamProcessor) Name ¶ added in v7.8.0
func (sp *StreamProcessor) Name() string
func (*StreamProcessor) Sync ¶ added in v7.8.0
func (sp *StreamProcessor) Sync(closeWhenReady chan<- struct{})