Documentation
¶
Index ¶
Constants ¶
View Source
const MonitorSocketAddr = "inproc://zmq_socket_monitor.rep"
MonitorSocketAddr is the address at which the socket monitor connects to the ZMQ publisher socket.
Variables ¶
This section is empty.
Functions ¶
func NewProducer ¶
func NewProducer(ctx context.Context, config *Config, metrics metrics.MetricCollector, namespace string, airbrakeHandler *airbrake.Handler, ackChan chan (*telemetry.Record), reliableAckTxTypes map[string]interface{}, logger *logrus.Logger) (producer telemetry.Producer, err error)
NewProducer creates a ZMQProducer with the given config.
Types ¶
type Config ¶
type Config struct { // Addr is the address to which to producer will attempt to bind. Addr string `json:"addr"` // ServerKeyJSONPath is the path to a file which contains the server's secret // key as a json. This key can be generated using zmq4.NewCurveKeypair ServerKeyJSONPath string `json:"server_key_json_path"` // AllowedPublicKeysJSONPath is the path to a file which contains a list of // allowed public keys for client connections. This field is optional. AllowedPublicKeysJSONPath string `json:"allowed_public_keys_json_path"` // Verbose controls if verbose logging is enabled for the socket. Verbose bool `json:"verbose"` }
Config contains the data necessary to configure a zmq producer.
type KeyJSON ¶
type KeyJSON struct { // Secret is the secret key encoded as a 40 char z85 string. Secret string `json:"secret"` // Public is the public key encoded as a 40 char z85 string. Public string `json:"public"` }
KeyJSON contains z85 key data
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics stores metrics reported from this package
type Producer ¶ added in v0.3.5
type Producer struct {
// contains filtered or unexported fields
}
Producer implements the telemetry.Producer interface by publishing to a bound zmq socket.
func (*Producer) ProcessReliableAck ¶ added in v0.3.5
ProcessReliableAck sends to ackChan if reliable ack is configured
Click to show internal directories.
Click to hide internal directories.