shared

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDuration

func ParseDuration(s string) (time.Duration, error)

ParseDuration parses a duration string that can be: - Go duration (e.g., "1h30m", "5m"). - Prometheus-style duration (e.g., "1h", "30m", "5s").

func ParseTime

func ParseTime(s string, now time.Time) (time.Time, error)

ParseTime parses a time string that can be either: - RFC3339 format (e.g., "2024-01-15T10:30:00Z"). - Unix timestamp (e.g., "1705315800"). - Relative time (e.g., "now", "now-1h", "now-30m", "now-7d").

Types

This section is empty.

Jump to

Keyboard shortcuts

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