github.com/TykTechnologies/tyk/tests/streams/scripts
No package summary is available.
Package
Files: 1. Third party imports: 2. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Constants
const (
protocolAmqp09 = "amqp_0_9"
protocolAmqp1 = "amqp_1"
defaultQueueName = "tyk-streams-test-queue"
defaultExchangeName = "tyk-streams-test-exchange"
defaultAMQPURL = "amqp://guest:guest@localhost:5672/"
)
Types
arguments
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| help |
|
No comment on field. |
| protocol |
|
No comment on field. |
| url |
|
No comment on field. |
| queue |
|
No comment on field. |
| exchange |
|
No comment on field. |
type arguments struct {
help bool
protocol string
url string
queue string
exchange string
}
payload
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Payload |
|
No comment on field. |
type payload struct {
Payload int64 `json:"payload"`
}
Private functions
func failOnError
failOnError (err error, msg string)
References: log.Panicf.
func generatePayload
generatePayload creates a JSON-formatted string containing the current Unix time in milliseconds as the payload.
generatePayload () string
References: json.Marshal, time.Now.
func main
main ()
References: flag.ContinueOnError, flag.NewFlagSet, fmt.Fprintf, ioutil.Discard, os.Args, os.Exit, os.Stdout.
func publishMessagesWithAMQP09
publishMessagesWithAMQP09 publishes messages to a RabbitMQ queue using the AMQP 0.9.1 protocol at regular intervals. url specifies the RabbitMQ server URL to connect to. queue defines the name of the RabbitMQ queue to which messages will be published.
publishMessagesWithAMQP09 (url string, exchange string, queue string)
References: amqp.Dial, amqp.Publishing, context.Background, context.WithTimeout, log.Printf, time.Second, time.Sleep.
func publishMessagesWithAMQP1
publishMessagesWithAMQP1 publishes messages to a RabbitMQ queue using the AMQP 1.0 protocol at regular intervals. url specifies the AMQP 1.0 server URL to connect to. queue defines the name of the RabbitMQ queue to publish messages.
publishMessagesWithAMQP1 (url string, queue string)
References: amqp1.Dial, amqp1.NewMessage, context.Background, log.Printf, time.Second, time.Sleep.
func usage
usage ()
References: fmt.Fprint, os.Stdout.