Documentation
ΒΆ
Index ΒΆ
- Constants
- func BatchParse(r io.Reader, batchSize int) <-chan []*Message
- func FastParse(r io.Reader) <-chan *Message
- func NewHttpReceiver(url string, opts ...interface{}) (*httpReceiver, error)
- func NewRetryClient(opts ...retryTransportOpt) (*http.Client, error)
- func Parse(r io.Reader) <-chan *Message
- func PutMessage(msg *Message)
- func SetLogger(l *slog.Logger)
- func WithConnectionInitialDelay(delay time.Duration) httpReceiverOpt
- func WithConnectionMaxDelay(delay time.Duration) httpReceiverOpt
- func WithConnectionMaxRetries(maxRetries int) httpReceiverOpt
- func WithHeaders(headers map[string]string) retryTransportOpt
- func WithInitialDelay(delay time.Duration) retryTransportOpt
- func WithMaxDelay(delay time.Duration) retryTransportOpt
- func WithMaxRetries(maxRetries int) retryTransportOpt
- type Message
- type Pusher
- type Receiver
Constants ΒΆ
View Source
const (
Version = "0.1.2"
)
Variables ΒΆ
This section is empty.
Functions ΒΆ
func BatchParse ΒΆ added in v0.1.0
BatchParse processes multiple messages in batches to reduce channel overhead
func FastParse ΒΆ added in v0.1.0
FastParse provides an even more optimized parsing implementation that reduces allocations further by reusing more components
func NewHttpReceiver ΒΆ added in v0.1.3
func NewRetryClient ΒΆ added in v0.1.3
NewRetryClient creates an HTTP client with retry logic and header injection
func PutMessage ΒΆ added in v0.1.0
func PutMessage(msg *Message)
PutMessage returns a message to the pool after resetting it
func WithConnectionInitialDelay ΒΆ added in v0.1.3
func WithConnectionMaxDelay ΒΆ added in v0.1.3
func WithConnectionMaxRetries ΒΆ added in v0.1.3
func WithConnectionMaxRetries(maxRetries int) httpReceiverOpt
func WithHeaders ΒΆ added in v0.1.3
func WithInitialDelay ΒΆ added in v0.1.3
func WithMaxDelay ΒΆ added in v0.1.3
func WithMaxRetries ΒΆ added in v0.1.3
func WithMaxRetries(maxRetries int) retryTransportOpt
Types ΒΆ
type Message ΒΆ added in v0.0.4
type Message struct {
Id string
Event string
Data string
// contains filtered or unexported fields
}
func GetMessage ΒΆ added in v0.1.0
func GetMessage() *Message
GetMessage gets a message from the pool
func NewMessage ΒΆ added in v0.0.8
func NewPingEvent ΒΆ added in v0.0.8
func NewPingEvent() *Message
func (*Message) Reset ΒΆ added in v0.1.0
func (m *Message) Reset()
Reset clears the message for reuse
func (*Message) SetMessage ΒΆ added in v0.1.0
SetMessage sets all fields at once for efficient reuse
Click to show internal directories.
Click to hide internal directories.