Versions in this module Expand all Collapse all v0 v0.3.0 Mar 9, 2023 v0.2.0 Dec 22, 2020 Changes in this version + const AvroJSONDefaultSchema + type Authentication pulsar.Authentication + func NewAuthenticationTLS(certificatePath string, privateKeyPath string) Authentication + type AvroJSONSerializer struct + func NewAvroJSONSerializer(r io.Reader) (*AvroJSONSerializer, error) + func (a *AvroJSONSerializer) Marshal(s *Sample) ([]byte, error) + func (a *AvroJSONSerializer) Unmarshal(data []byte) (*Sample, error) + type Client struct + func NewClient(config Config) (*Client, error) + func (*Client) Name() string + func (c *Client) Close() error + func (c *Client) InitConsumer() error + func (c *Client) InitProducer() error + func (c *Client) Receiver(ctx context.Context, sampleCh chan ReceivedSample) (done chan struct{}, err error) + func (c *Client) WithSerializer(s Serializer) *Client + func (c *Client) Write(ctx context.Context, samples model.Samples) error + type ClientOptions pulsar.ClientOptions + type Config struct + Logger log.Logger + ReplicaLabels []string + Subscription string + Topic string + type JSONCompatSerializer struct + func NewJSONCompatSerializer() *JSONCompatSerializer + func (*JSONCompatSerializer) Marshal(s *Sample) ([]byte, error) + func (*JSONCompatSerializer) Unmarshal(data []byte) (*Sample, error) + type JSONSerializer struct + func NewJSONSerializer() *JSONSerializer + func (*JSONSerializer) Marshal(s *Sample) ([]byte, error) + func (*JSONSerializer) Unmarshal(data []byte) (*Sample, error) + type ReceivedSample struct + Ack func() + Context context.Context + Nack func() + Sample *model.Sample + type Sample struct + Metric model.Metric + TenantID string + Value model.SamplePair + func NewSample(s *model.Sample) *Sample + type Serializer interface + Marshal func(*Sample) ([]byte, error) + Unmarshal func([]byte) (*Sample, error)