Documentation ¶
Index ¶
- func EarliestTimestamp[E any](items []E, f func(E) *timestamppb.Timestamp) *timestamppb.Timestamp
- func Int32Attributes[E any](all []E, fn func(E) *types.Int32Attributes) *types.Int32Attributes
- func Int32Bounds[E any](items []E, f func(E) *types.Int32Bounds) *types.Int32Bounds
- func LatestTimestamp[E any](items []E, f func(E) *timestamppb.Timestamp) *timestamppb.Timestamp
- func Max[N Number, E any](items []E, f func(E) (N, bool)) (N, bool)
- func MaxDuration[E any](items []E, f func(E) *durationpb.Duration) *durationpb.Duration
- func Mean[N Number, E any](items []E, f func(E) (N, bool)) (N, bool)
- func Mode[N Number, E any](items []E, f func(E) (N, bool)) (N, bool)
- func Ptr[T any](v T, ok bool) *T
- func ResourceSupport[E any](all []E, fn func(E) *types.ResourceSupport) *types.ResourceSupport
- func Sum[N Number, E any](items []E, f func(E) (N, bool)) (N, bool)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EarliestTimestamp ¶
func EarliestTimestamp[E any](items []E, f func(E) *timestamppb.Timestamp) *timestamppb.Timestamp
func Int32Attributes ¶ added in v0.2024.5
func Int32Attributes[E any](all []E, fn func(E) *types.Int32Attributes) *types.Int32Attributes
func Int32Bounds ¶ added in v0.2024.5
func Int32Bounds[E any](items []E, f func(E) *types.Int32Bounds) *types.Int32Bounds
func LatestTimestamp ¶
func LatestTimestamp[E any](items []E, f func(E) *timestamppb.Timestamp) *timestamppb.Timestamp
func MaxDuration ¶ added in v0.2024.5
func MaxDuration[E any](items []E, f func(E) *durationpb.Duration) *durationpb.Duration
MaxDuration returns the maximum duration from the given items.
func ResourceSupport ¶ added in v0.2024.5
func ResourceSupport[E any](all []E, fn func(E) *types.ResourceSupport) *types.ResourceSupport
ResourceSupport merges all ResourceSupport values into a single ResourceSupport. If any item is readable, the result will be readable, similarly for writable and observable. If any items disagree on PullSupport, the result will be PULL_SUPPORT_UNSPECIFIED. PullPoll is the maximum of all PullPoll values.
Types ¶
type Number ¶
type Number interface { constraints.Float | constraints.Integer }
Click to show internal directories.
Click to hide internal directories.