common

package
v0.0.0-...-6436120 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LogEveryN controls how frequently common log messages are logged.
	LogEveryN = 100

	// ChannelCreateDelay controls the rate at which channels are created.
	ChannelCreateDelay = 20 * time.Millisecond

	// ChannelTrackTopic is the topic tp track channel join/leaves.
	ChannelTrackTopic = "Pixie.JetStream.Loadtest.Channels"

	// UpdateTopic is the topic for messages on a particular channel.
	UpdateTopic = "Pixie.JetStream.Loadtest.Update"
)

Variables

View Source
var LoadTestStream = &nats.StreamConfig{
	Name: "LoadTestStream",
	Subjects: []string{
		ChannelTrackTopic,
		GetTopicForChannel("*"),
	},
	Replicas:    5,
	AllowDirect: true,
	MaxAge:      time.Hour * 24,
}

LoadTestStream is the stream config for loadtest messages.

Functions

func GetTopicForChannel

func GetTopicForChannel(channel string) string

GetTopicForChannel gets the topic name given a channel name.

func SetupJetStream

func SetupJetStream(purge bool) msgbus.Streamer

SetupJetStream parses the given flags, connects to nats/jetstream and returns the streamer interface.

Types

This section is empty.

Jump to

Keyboard shortcuts

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