Documentation ¶
Index ¶
- Variables
- func NewManualHashPartitioner(topic string) sarama.Partitioner
- func NewPlugin() (*pkgplugin.Plugin, error)
- func NewPluginVersion(name string, version string, commitID string) (*pkgplugin.Plugin, error)
- func NewSender(tid tenant.Id, plugin string, name string, config interface{}, ...) (sender.Sender, error)
- type DynamicMetricLabel
- type DynamicMetricValue
- type ManualHashPartitioner
- type Producer
- type Sender
- func (s *Sender) Config() interface{}
- func (s *Sender) Count() int
- func (s *Sender) EventErrorCount() int
- func (s *Sender) EventErrorVelocity() int
- func (s *Sender) EventSuccessCount() int
- func (s *Sender) EventSuccessVelocity() int
- func (s *Sender) EventTs() int64
- func (s *Sender) Hash() string
- func (s *Sender) Name() string
- func (s *Sender) NewProducer(count int) (*Producer, error)
- func (s *Sender) NewSyncProducers(count int) ([]sarama.SyncProducer, sarama.Client, error)
- func (s *Sender) Plugin() string
- func (s *Sender) Send(e event.Event)
- func (s *Sender) StopSending(ctx context.Context)
- func (s *Sender) Tenant() tenant.Id
- func (s *Sender) Unwrap() sender.Sender
- type SenderConfig
- type SenderMetrics
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = "gears" Version = "v0.0.0" CommitID = "" )
View Source
var DefaultSenderConfig = SenderConfig{ Brokers: "localhost:9092", Topic: "", ChannelBufferSize: pointer.Int(0), Username: "", Password: "", CACert: "", AccessCert: "", AccessKey: "", Version: "", SenderPoolSize: pointer.Int(1), DynamicMetricLabels: make([]DynamicMetricLabel, 0), Location: "", App: "", Partner: "", Uses: "", }
Functions ¶
func NewManualHashPartitioner ¶
func NewManualHashPartitioner(topic string) sarama.Partitioner
func NewPluginVersion ¶
Types ¶
type DynamicMetricLabel ¶
type DynamicMetricValue ¶
type ManualHashPartitioner ¶
type ManualHashPartitioner struct {
sarama.Partitioner
}
func (*ManualHashPartitioner) Partition ¶
func (mp *ManualHashPartitioner) Partition(message *sarama.ProducerMessage, numPartitions int32) (int32, error)
type Sender ¶
func (*Sender) EventErrorCount ¶ added in v1.1.2
func (*Sender) EventErrorVelocity ¶ added in v1.1.2
func (*Sender) EventSuccessCount ¶ added in v1.1.2
func (*Sender) EventSuccessVelocity ¶ added in v1.1.2
func (*Sender) NewSyncProducers ¶
func (*Sender) StopSending ¶
type SenderConfig ¶
type SenderConfig struct { Brokers string `json:"brokers,omitempty"` Topic string `json:"topic,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` CACert string `json:"caCert,omitempty"` AccessCert string `json:"accessCert,omitempty"` AccessKey string `json:"accessKey,omitempty"` Version string `json:"version,omitempty"` ChannelBufferSize *int `json:"channelBufferSize,omitempty"` TLSEnable bool `json:"tlsEnable,omitempty"` SenderPoolSize *int `json:"senderPoolSize,omitempty"` DynamicMetricLabels []DynamicMetricLabel `json:"dynamicMetricLabel,omitempty"` CompressionMethod string `json:"compressionMethod,omitempty"` CompressionLevel *int `json:"compressionLevel,omitempty"` Location interface{} `json:"location,omitempty"` // gears config: string or array of strings, may contain path App string `json:"app,omitempty"` // gears config Partner string `json:"partner,omitempty"` // gears config Uses string `json:"uses,omitempty"` // gears config }
SenderConfig can be passed into NewSender() in order to configure the behavior of the sender.
type SenderMetrics ¶
type SenderMetrics struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.