utils

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnderTest = false

Functions

func IgnoreError

func IgnoreError(fn func() error)

func RandDate

func RandDate(rnd *rand.Rand) time.Time

func RandDateStr added in v1.8.5

func RandDateStr(rnd *rand.Rand) string

RandDateStr generates time in string representation it is done in such way because we wanted to make JSON statement to work but scylla supports only string representation of date in JSON format

func RandIPV4Address added in v1.8.3

func RandIPV4Address(rnd *rand.Rand, v, pos int) string

func RandInt2 added in v1.8.3

func RandInt2(rnd *rand.Rand, min, max int) int

func RandString

func RandString(rnd *rand.Rand, ln int) string

func RandTime

func RandTime(rnd *rand.Rand) int64

According to the CQL binary protocol, time is an int64 in range [0;86399999999999] https://github.com/apache/cassandra/blob/f5df4b219e063cb24b9cc0c22b6e614506b8d903/doc/native_protocol_v4.spec#L941 An 8 byte two's complement long representing nanoseconds since midnight. Valid values are in the range 0 to 86399999999999

func RandTimestamp added in v1.8.5

func RandTimestamp(rnd *rand.Rand) int64

func SetUnderTest

func SetUnderTest()

func UUIDFromTime

func UUIDFromTime(rnd *rand.Rand) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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