Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTimeOut timed out ErrTimeOut = errors.New("timed out") )
Functions ¶
func SimpleFuture ¶
SimpleFuture a simple future func
Types ¶
type Future ¶
type Future[T any] struct { Success bool Done bool Result T InterfaceChannel <-chan T // contains filtered or unexported fields }
Future type holds Result and state
func FutureFunc ¶
FutureFunc creates a function that returns its response in future
Click to show internal directories.
Click to hide internal directories.