Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bytes ¶ added in v0.12.0
type Bytes uint64
Bytes is a data type which supports yaml serialization/deserialization with units.
func (*Bytes) MarshalYAML ¶ added in v0.12.0
func (*Bytes) UnmarshalYAML ¶ added in v0.12.0
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 time or duration.
Click to show internal directories.
Click to hide internal directories.