Documentation ¶
Index ¶
Constants ¶
const (
DefaultEgressTableName = "streams_egress" // default egress table name.
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
A Batch is an aggregate of messages written by a system ready to be published to message brokers or similar infrastructure.
type EmbeddedNotifier ¶
type EmbeddedNotifier struct {
Forwarder Forwarder
}
EmbeddedNotifier an agent-less Notifier implementation used by a system to call a Forwarder instance directly.
func (EmbeddedNotifier) NotifyAgent ¶
func (n EmbeddedNotifier) NotifyAgent(batchID string) error
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
A Forwarder is an internal component used by an egress proxy agent to redirect queued-traffic (i.e. stream messages) to a message broker or similar infrastructure.
func NewForwarder ¶
func NewForwarder(cfg ForwarderConfig) Forwarder
func (Forwarder) ForwardBatch ¶
ForwardBatch triggers a new forward job for the specified batch.
type ForwarderConfig ¶
type ForwarderConfig struct { Storage Storage // A storage a Forwarder instance uses to fetch message batches (queued-traffic). Writer streams.Writer // A writer implementation a Forwarder instance uses to publish message batches to. Codec codec.Codec // Codec used by the egress writer to store traffic messages. Logger *log.Logger // Logger to write information to. TableName string // Name of the egress table. ForwardJobTimeout time.Duration // Maximum time duration to wait a forward job to finish. ForwardJobTotalRetries int // Maximum count a forward job will be retried. ForwardJobRetryBackoff time.Duration // Initial time duration between each retry process. ForwardJobRetryBackoffMax time.Duration // Maximum time duration between each retry process. }
A ForwarderConfig is the configuration used by a Forwarder.
func NewForwarderDefaultConfig ¶
func NewForwarderDefaultConfig() ForwarderConfig
type NetworkNotifier ¶
type NetworkNotifier struct {
// contains filtered or unexported fields
}
func (NetworkNotifier) NotifyAgent ¶
func (n NetworkNotifier) NotifyAgent(batchID string) error
type NoopStorage ¶
type Notifier ¶
type Notifier interface { // NotifyAgent triggers egress proxy agent to forward traffic buffer (batch) into a stream. NotifyAgent(batchID string) error }
A Notifier is an egress proxy component used by a system to notify the egress proxy agent to forward traffic buffer (batch) into a stream.
type Storage ¶
type Storage interface { // GetBatch retrieves specified batch. GetBatch(ctx context.Context, batchID string) (Batch, error) // Commit Evicts specified batch. Commit(ctx context.Context, batchID string) error }
A Storage is a special kind of storage where traffic is ingested (queued) so an egress proxy agent (or similar artifacts) may forward message batches to another set of infrastructure (e.g. message broker).
type StorageConfig ¶
type StorageConfig struct {
TableName string
}
A StorageConfig is the main configuration of a Storage.
type StorageOption ¶
type StorageOption interface {
Apply(*StorageConfig)
}
func WithEgressTable ¶
func WithEgressTable(table string) StorageOption