Documentation
¶
Index ¶
- func After[V any](v Value[V], f func()) (stop func() bool)
- func After2[K, V any](v Value2[K, V], f func()) (stop func() bool)
- func Await[V any](ctx context.Context, v Value[V]) (V, error)
- func Await2[K, V any](ctx context.Context, v Value2[K, V]) (K, V, error)
- type Value
- func All[V any](vs ...Value[V]) Value[[]V]
- func AllSeq[V any](vs iter.Seq[Value[V]]) Value[[]V]
- func Compute[V any](f func() V) Value[V]
- func ComputeContext[V any](ctx context.Context, f func(ctx context.Context) V) Value[V]
- func Const[V any](v V) Value[V]
- func Delay[V any](v V, t time.Duration) Value[V]
- func FlatMap[VIn, VOut any](valIn Value[VIn], f func(VIn) Value[VOut]) Value[VOut]
- func Flatten[V any](val Value[Value[V]]) Value[V]
- func Map[VIn, VOut any](valIn Value[VIn], f func(VIn) VOut) Value[VOut]
- func MapLower[KIn, VIn, VOut any](valIn Value2[KIn, VIn], f func(KIn, VIn) VOut) Value[VOut]
- func Never[V any]() Value[V]
- func NewValue[V any]() (v Value[V], resolve func(V))
- func Race[V any](vals ...Value[V]) Value[V]
- func RaceSeq[V any](vals iter.Seq[Value[V]]) Value[V]
- type Value2
- func All2Seq[K, V any](vs iter.Seq[Value2[K, V]]) Value2[[]K, []V]
- func Compute2[K, V any](f func() (K, V)) Value2[K, V]
- func Compute2Context[K, V any](ctx context.Context, f func(ctx context.Context) (K, V)) Value2[K, V]
- func ComputeContextErr[V any](ctx context.Context, f func(ctx context.Context) (V, error)) Value2[V, error]
- func Const2[K, V any](k K, v V) Value2[K, V]
- func Delay2[K, V any](k K, v V, t time.Duration) Value2[K, V]
- func FlatMap2[KIn, VIn, KOut, VOut any](valIn Value2[KIn, VIn], f func(KIn, VIn) Value2[KOut, VOut]) Value2[KOut, VOut]
- func Flatten2[K, V any](val Value[Value2[K, V]]) Value2[K, V]
- func LiftFailure[V any](v Value[error]) Value2[V, error]
- func LiftSuccess[V any](v Value[V]) Value2[V, error]
- func Map2[KIn, VIn, KOut, VOut any](valIn Value2[KIn, VIn], f func(KIn, VIn) (KOut, VOut)) Value2[KOut, VOut]
- func MapLift[VIn, KOut, VOut any](valIn Value[VIn], f func(VIn) (KOut, VOut)) Value2[KOut, VOut]
- func Never2[K, V any]() Value2[K, V]
- func NewValue2[K, V any]() (v Value2[K, V], resolve func(K, V))
- func Race2[K, V any](vals ...Value2[K, V]) Value2[K, V]
- func Race2Seq[K, V any](vals iter.Seq[Value2[K, V]]) Value2[K, V]
- func TryAll[V any](vs ...Value2[V, error]) Value2[[]V, error]
- func TryAllSeq[V any](vs iter.Seq[Value2[V, error]]) Value2[[]V, error]
- func TryMap[VIn, VOut any](v Value2[VIn, error], f func(VIn) VOut) Value2[VOut, error]
- func TryMapErr[VIn, VOut any](v Value2[VIn, error], f func(VIn) (VOut, error)) Value2[VOut, error]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Value ¶
type Value[V any] interface { Value() V Done() <-chan struct{} }
func ComputeContext ¶
Click to show internal directories.
Click to hide internal directories.