utils

package
v0.0.0-...-50e45a6 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateRedisStreamMinID

func CalculateRedisStreamMinID(retentionTimeInMs int64) (string, error)

Calculates the minimum ID for a Redis stream

func FileExists

func FileExists(filepath string) bool

Check if a file exists at the given path

func GetTimestampFromStreamMessageID

func GetTimestampFromStreamMessageID(id string) (int64, error)

Get the timestamp from a Redis stream message ID

func HashString

func HashString(s string) string

func IsValidTimeUnitString

func IsValidTimeUnitString(value string) bool

func ParseInt64

func ParseInt64(s string) int64

func ParseTimeUnitString

func ParseTimeUnitString(value string) (int, error)

Parses a time unit string into a duration in seconds

func SerializeStreamMessageValues

func SerializeStreamMessageValues(values map[string]interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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