Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManyToOne ¶
type ManyToOne struct {
// contains filtered or unexported fields
}
ManyToOne diode is optimal for many writers and a single reader for slices of bytes.
func NewManyToOne ¶
NewManyToOne initializes a new many to one diode of a given size and alerter. The alerter is called whenever data is dropped with an integer representing the number of byte slices that were dropped.
func (*ManyToOne) Next ¶
Next will return the next item to be read from the diode. If the diode is empty this method will block until an item is available to be read.
type ManyToOneEnvelope ¶
type ManyToOneEnvelope struct {
// contains filtered or unexported fields
}
ManyToOneEnvelope diode is optimal for many writers and a single reader for V1 envelopes.
func NewManyToOneEnvelope ¶
func NewManyToOneEnvelope(size int, alerter gendiodes.Alerter) *ManyToOneEnvelope
NewManyToOneEnvelope returns a new ManyToOneEnvelope diode to be used with many writers and a single reader.
func (*ManyToOneEnvelope) Next ¶
func (d *ManyToOneEnvelope) Next() *events.Envelope
Next will return the next V1 envelope to be read from the diode. If the diode is empty this method will block until anenvelope is available to be read.
func (*ManyToOneEnvelope) Set ¶
func (d *ManyToOneEnvelope) Set(data *events.Envelope)
Set inserts the given V1 envelope into the diode.
type OneToOne ¶
type OneToOne struct {
// contains filtered or unexported fields
}
OneToOne diode is optimized for a single writer and a single reader for byte slices.
func NewOneToOne ¶
NewOneToOne initializes a new one to one diode of a given size and alerter. The alerter is called whenever data is dropped with an integer representing the number of byte slices that were dropped.
func (*OneToOne) Next ¶
Next will return the next item to be read from the diode. If the diode is empty this method will block until an item is available to be read.
type OneToOneEnvelope ¶
type OneToOneEnvelope struct {
// contains filtered or unexported fields
}
ManyToOneEnvelope diode is optimal for many writers and a single reader for V1 envelopes.
func NewOneToOneEnvelope ¶
func NewOneToOneEnvelope(size int, alerter gendiodes.Alerter) *OneToOneEnvelope
NewManyToOneEnvelope returns a new ManyToOneEnvelope diode to be used with many writers and a single reader.
func (*OneToOneEnvelope) Next ¶
func (d *OneToOneEnvelope) Next() *events.Envelope
Next will return the next V1 envelope to be read from the diode. If the diode is empty this method will block until anenvelope is available to be read.
func (*OneToOneEnvelope) Set ¶
func (d *OneToOneEnvelope) Set(data *events.Envelope)
Set inserts the given V1 envelope into the diode.