Documentation
¶
Index ¶
- func AddFinalizer(f func())
- func CreateFile(input string, closeOnExit bool, def ...io.Writer) (io.Writer, error)
- func ExecuteFinalizers()
- func FormatString[T constraints.Integer](dst []byte, integer T) string
- func IgnoreError(fn func() error)
- func IsUnderTest() bool
- func Must[T any](val T, err error) T
- func RandDate(rnd *rand.Rand) time.Time
- func RandDateStr(rnd *rand.Rand) string
- func RandIPV4Address(rnd *rand.Rand, v, pos int) string
- func RandInt2(rnd *rand.Rand, minimum, maximum int) int
- func RandString(rnd *rand.Rand, ln int) string
- func RandTime(rnd *rand.Rand) int64
- func RandTimestamp(rnd *rand.Rand) int64
- func SingleScylla(tb testing.TB, _ ...time.Duration) *gocql.Session
- func Sizeof(v any) uint64
- func TestContainers(tb testing.TB, _ ...time.Duration) (*gocql.Session, *gocql.Session)
- func UUIDFromTime(rnd *rand.Rand) string
- func UnsafeBytes(s string) []byte
- func UnsafeString(b []byte) string
- type MemoryFootprint
- type QueryContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFinalizer ¶ added in v1.11.0
func AddFinalizer(f func())
func CreateFile ¶ added in v1.9.0
func ExecuteFinalizers ¶ added in v1.11.0
func ExecuteFinalizers()
func FormatString ¶ added in v1.9.3
func FormatString[T constraints.Integer](dst []byte, integer T) string
func IgnoreError ¶
func IgnoreError(fn func() error)
func IsUnderTest ¶ added in v1.9.0
func IsUnderTest() bool
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 RandString ¶
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
RandTimestamp generates timestamp in nanoseconds Date limit needed to make sure that textual representation of the date is parsable by cql and drivers Currently CQL fails: unable to parse date '95260-10-10T19:09:07.148+0000': marshaling error: Unable to parse timestamp from '95260-10-10t19:09:07.148+0000'" if year is bigger than 9999, same as golang time.Parse
func SingleScylla ¶ added in v1.11.0
func TestContainers ¶ added in v1.10.0
func UUIDFromTime ¶
func UUIDFromTime(rnd *rand.Rand) string
Types ¶
type MemoryFootprint ¶ added in v1.9.3
type MemoryFootprint interface {
MemoryFootprint() uint64
}
type QueryContextKey ¶ added in v1.11.0
type QueryContextKey string
const ( QueryID QueryContextKey = "query_id" GeminiAttempt QueryContextKey = "gemini_attempt" )