Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeOrDurationValue ¶
TimeOrDurationValue is a custom kingping parser for time in RFC3339 or duration in Go's duration format, such as "300ms", "-1.5h" or "2h45m". Only one will be set.
func TimeOrDuration ¶
func TimeOrDuration(flags *kingpin.FlagClause) *TimeOrDurationValue
TimeOrDuration helper for parsing TimeOrDuration with kingpin.
func (*TimeOrDurationValue) PrometheusTimestamp ¶
func (tdv *TimeOrDurationValue) PrometheusTimestamp() int64
PrometheusTimestamp returns TimeOrDurationValue converted to PrometheusTimestamp if duration is set now+duration is converted to Timestamp.
func (*TimeOrDurationValue) Set ¶
func (tdv *TimeOrDurationValue) Set(s string) error
Set converts string to TimeOrDurationValue.
func (*TimeOrDurationValue) String ¶
func (tdv *TimeOrDurationValue) String() string
String returns either tume or duration.
Click to show internal directories.
Click to hide internal directories.