Documentation
¶
Index ¶
- func IsPulsarError(err error) bool
- func NewPulsarClient(config *configuration.PulsarConfig) (pulsar.Client, error)
- func ParsePulsarCompressionLevel(compressionLevelStr string) (pulsar.CompressionLevel, error)
- func ParsePulsarCompressionType(compressionTypeStr string) (pulsar.CompressionType, error)
- func PulsarError(err error) *pulsar.Error
- type PulsarMessageId
- func (id *PulsarMessageId) BatchIdx() int32
- func (id *PulsarMessageId) EntryID() int64
- func (id *PulsarMessageId) Equal(other *PulsarMessageId) (bool, error)
- func (id *PulsarMessageId) Greater(other *PulsarMessageId) (bool, error)
- func (id *PulsarMessageId) GreaterEqual(other *PulsarMessageId) (bool, error)
- func (id *PulsarMessageId) LedgerID() int64
- func (id *PulsarMessageId) PartitionIdx() int32
- func (id *PulsarMessageId) Serialize() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPulsarError ¶
IsPulsarError returns true if there is a pulsar.Error in the chain.
func NewPulsarClient ¶
func NewPulsarClient(config *configuration.PulsarConfig) (pulsar.Client, error)
func ParsePulsarCompressionLevel ¶
func ParsePulsarCompressionLevel(compressionLevelStr string) (pulsar.CompressionLevel, error)
func ParsePulsarCompressionType ¶
func ParsePulsarCompressionType(compressionTypeStr string) (pulsar.CompressionType, error)
func PulsarError ¶
PulsarError returns the first pulsar.Error in the chain, or nil if no such error is found.
Types ¶
type PulsarMessageId ¶
type PulsarMessageId struct {
// contains filtered or unexported fields
}
PulsarMessageId implements the pulsar.MessageID interface (which uniquely identifies a Pulsar message). We need this since the pulsar client library does not export a MessageID implementation. For PulsarMessageId, we provide, e.g., comparison functions.
func FromMessageId ¶
func FromMessageId(id pulsar.MessageID) *PulsarMessageId
FromMessageId converts a pulsar.MessageID interface type to a *PulsarMessageId, which can be used, e.g., for comparison.
func New ¶
func New(ledgerID, entryID int64, partitionIdx, batchIdx int32) *PulsarMessageId
func (*PulsarMessageId) BatchIdx ¶
func (id *PulsarMessageId) BatchIdx() int32
func (*PulsarMessageId) EntryID ¶
func (id *PulsarMessageId) EntryID() int64
func (*PulsarMessageId) Equal ¶
func (id *PulsarMessageId) Equal(other *PulsarMessageId) (bool, error)
func (*PulsarMessageId) Greater ¶
func (id *PulsarMessageId) Greater(other *PulsarMessageId) (bool, error)
Greater returns true if id occurred after other, or an error if the message ids are not comparable (i.e., if they are from different partitions).
func (*PulsarMessageId) GreaterEqual ¶
func (id *PulsarMessageId) GreaterEqual(other *PulsarMessageId) (bool, error)
func (*PulsarMessageId) LedgerID ¶
func (id *PulsarMessageId) LedgerID() int64
func (*PulsarMessageId) PartitionIdx ¶
func (id *PulsarMessageId) PartitionIdx() int32
func (*PulsarMessageId) Serialize ¶
func (id *PulsarMessageId) Serialize() []byte