Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chan ¶
type Chan[T any] chan T
Chan is a channel with utility methods.
func (Chan[T]) Recv ¶
Recv will try to receive a value from the channel, same as <-c. If the context is canceled before a value is received, it will return the context error.
func (Chan[T]) RecvTimeout ¶
RecvTimeout will try to receive a value from the channel, same as <-c. If the context is canceled before a value is received or the timeout is reached, it will return the context error.
func (Chan[T]) Send ¶ added in v0.5.1
Send will try to send a value to the channel, same as c<-v. If the context is canceled before a value is sent, it will return the context error.
func (Chan[T]) SendTimeout ¶ added in v0.5.1
SendTimeout will try to send a value to the channel, same as c<-v. If the context is canceled before a value is sent or the timeout is reached, it will return the context error.
type ChanIn ¶ added in v0.5.1
type ChanIn[T any] chan<- T
ChanIn is an input channel with utility methods.
func (ChanIn[T]) Send ¶ added in v0.5.1
Send will try to send a value to the channel, same as c<-v. If the context is canceled before a value is sent, it will return the context error.
func (ChanIn[T]) SendTimeout ¶ added in v0.5.1
SendTimeout will try to send a value to the channel, same as c<-v. If the context is canceled before a value is sent or the timeout is reached, it will return the context error.
type ChanOut ¶ added in v0.5.1
type ChanOut[T any] <-chan T
ChanOut is an output channel with utility methods.
func (ChanOut[T]) Recv ¶ added in v0.5.1
Recv will try to receive a value from the channel, same as <-c. If the context is canceled before a value is received, it will return the context error.
func (ChanOut[T]) RecvTimeout ¶ added in v0.5.1
RecvTimeout will try to receive a value from the channel, same as <-c. If the context is canceled before a value is received or the timeout is reached, it will return the context error.