Documentation ¶
Index ¶
Constants ¶
const (
// PrefixDelimiter for message prefix
PrefixDelimiter = "-"
)
Variables ¶
This section is empty.
Functions ¶
func AllMsgPayloads ¶
AllMsgPayloads generates a series of payloads based on specified payload sizes or the number of messages
func GenPayload ¶
GenPayload generates an array of bytes with prefix string and payload size. If the specified payload size is less than the prefix size, the payload will just be the prefix.
func GetMessageID ¶
GetMessageID returns the message index by parsing the template payload string with a prefix.
func NumOfBytes ¶
NumOfBytes returns a number of bytes with specified size in MB or KB
Types ¶
type Payload ¶
type Payload struct { Ceiling int Floor int DefaultPayload []byte // to save time for large payload size generation }
Payload defines the payload size
func NewPayload ¶
NewPayload returns a new Payload object with a fixed payload size
func (*Payload) GenDefaultPayload ¶
GenDefaultPayload generates default payload size
func (Payload) PrefixDefaultPayload ¶
PrefixDefaultPayload creates string prefix in the payload
func (Payload) PrefixPayload ¶
PrefixPayload creates string prefix in the payload