queue

package
v4.2.462+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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
)

Variables

This section is empty.

Functions

func GetGranularitySec added in v0.9.166

func GetGranularitySec(granularityStr string) int64

func GetGranularityStr added in v0.9.1

func GetGranularityStr(granularitySec int64) string

func GetMetricLabel added in v0.9.205

func GetMetricLabel(mt datahub_v1alpha1.MetricType) string

func GetQueueConn added in v0.9.1

func GetQueueConn(queueURL string, retryItvMS int64) *amqp.Connection

func NewJobBuilder

func NewJobBuilder(unitType string, granularitySec int64, payloadJSONString string) *jobBuilder

Types

type QueueSender

type QueueSender interface {
	SendJsonString(queueName, jsonStr, msgID string) error
	// contains filtered or unexported methods
}

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) 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(conn *amqp.Connection) *RabbitMQSender

func (*RabbitMQSender) SendJsonString

func (sender *RabbitMQSender) SendJsonString(queueName, jsonStr, msgID string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL