package
0.0.0-20210621012306-d5049b0385c5
Repository: https://github.com/kafkaesque-io/pulsar-monitor.git
Documentation: pkg.go.dev

# Functions

AssignString returns the first non-empty string It is equivalent the following in Javascript var value = val0 || val1 || val2 || default.
ComputeDelta computes positive delta between last and current integer value, returns a default if the delta is negative.
GetStdBucket gets the standard deviation bucket.
JoinString joins multiple strings.
MinInt returns a smaller integer of two integers.
NewSycMap creates a new SyncMap.
PreserveHeaderForRedirect preserves HTTP headers during HTTP redirect.
RandStringBytes generates n length byte array with each byte is randomly picked from lower or upper case letters.
ReadFile reads /etc/lsd_release Similar to Read(), but takes the name of a file to load instead.
ReceiverHeader parses headers for Pulsar required configuration.
ReportError logs error.
ResponseErrorJSON builds a Http response.
SingleSlashJoin joins two parts of url path with no double slash.
StrContains check if a string is contained in an array of string.
StrToInt converts string to an integer format with a default if inproper value retrieved.
TimeDuration evaluate the run interval with the guard default value.
TokenizeTopicFullName tokenizes a topic full name into persistent, tenant, namespace, and topic name.
TopicFnToURL converts fully qualified topic name to url route.
Trim trims leading/prefix and suffix spaces, tab, \n in a string.
VerifyMessageByPulsarConsumer instantiates a Pulsar consumer and verifies an expected message.

# Structs

ConsumerResult is Pulsar Consumer result for channel communication.
ResponseErr - Error struct for Http response.
SyncMap is a generic map data structure protected with syc.RWMutex.