Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeMetadata ¶
DecodeMetadata decodes a component metadata into a struct. This is an extension of mitchellh/mapstructure which also supports decoding durations.
Types ¶
type ByteSize ¶
ByteSize contains a quantity for a resource that is measured in bytes. This extends the resource.Quantity struct from k8s.io/apimachinery to add some utility methods specific for Dapr. Although the library from K8s supports other kinds of resource quantities, our focus is on sizes in bytes.
func NewByteSize ¶
NewByteSize returns a new ByteSize with a default value in bytes.
type Duration ¶
func (Duration) MarshalJSON ¶
func (Duration) ToISOString ¶
ToISOString returns the duration formatted as a ISO-8601 duration string (-ish). This methods supports days, hours, minutes, and seconds. It assumes all durations are in UTC time and are not impacted by DST (so all days are 24-hours long). This method does not support fractions of seconds, and durations are truncated to seconds. See https://en.wikipedia.org/wiki/ISO_8601#Durations for referece.