Documentation ¶
Index ¶
- Constants
- func GetGranularitySec(granularityStr string) int64
- func GetGranularityStr(granularitySec int64) string
- func GetQueueConn(queueURL string, retryItvMS int64) *amqp.Connection
- func NewJobBuilder(clusterID string, unitType string, granularitySec int64, ...) *jobBuilder
- type QueueSender
- type RabbitMQConsumer
- type RabbitMQSender
Constants ¶
View Source
const ( DEFAULT_PUBLISH_RETRY_TIME = 3 DEFAULT_PUBLISH_RETRY_INTERVAL_MS int64 = 500 DEFAULT_CONSUME_RETRY_TIME = 3 DEFAULT_CONSUME_RETRY_INTERVAL_MS int64 = 500 DEFAULT_ACK_TIMEOUT_SEC = 3 )
Variables ¶
This section is empty.
Functions ¶
func GetGranularitySec ¶ added in v0.9.166
func GetGranularityStr ¶ added in v0.9.1
func GetQueueConn ¶ added in v0.9.1
func GetQueueConn(queueURL string, retryItvMS int64) *amqp.Connection
func NewJobBuilder ¶
func NewJobBuilder(clusterID string, unitType string, granularitySec int64, metricType datahub_common.MetricType, payloadJSONString string, extraJobInfo map[string]string) *jobBuilder
Types ¶
type QueueSender ¶
type RabbitMQConsumer ¶ added in v0.9.1
type RabbitMQConsumer struct {
// contains filtered or unexported fields
}
func NewRabbitMQConsumer ¶ added in v0.9.1
func NewRabbitMQConsumer(conn *amqp.Connection) *RabbitMQConsumer
func (*RabbitMQConsumer) ConsumeJsonString ¶ added in v0.9.166
func (consumer *RabbitMQConsumer) ConsumeJsonString(queueName string) (<-chan amqp.Delivery, error)
func (*RabbitMQConsumer) ReceiveJsonString ¶ added in v0.9.1
func (consumer *RabbitMQConsumer) ReceiveJsonString(queueName string) ( string, bool, error)
type RabbitMQSender ¶
type RabbitMQSender struct {
// contains filtered or unexported fields
}
func NewRabbitMQSender ¶
func NewRabbitMQSender(queueURL string, retryItvMS int64) (*RabbitMQSender, *amqp.Connection)
func (*RabbitMQSender) SendJob ¶
func (sender *RabbitMQSender) SendJob(queueName string, unit *config.Unit, columns, values []string, metricType datahub_common.MetricType, granularity int64) error
func (*RabbitMQSender) SendJsonString ¶
func (sender *RabbitMQSender) SendJsonString(queueName, jsonStr, msgID string, granularity int64) error
Click to show internal directories.
Click to hide internal directories.