Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tokens ¶
type Tokens struct {
// contains filtered or unexported fields
}
func (*Tokens) Done ¶
func (ts *Tokens) Done() <-chan struct{}
Done returns a channel that is closed when the flow associated with the Token completes. Clients should call Error after the channel is closed to check if the flow completed successfully.
Done is provided for use in select statements. Simple use cases may use Wait or WaitTimeout.
func (*Tokens) Wait ¶
Wait will wait indefinitely for the Token to complete, ie the Publish to be sent and confirmed receipt from the broker.
func (*Tokens) WaitTimeout ¶
WaitTimeout takes a time.Duration to wait for the flow associated with the Token to complete, returns true if it returned before the timeout or returns false if the timeout occurred. In the case of a timeout the Token does not have an error set in case the caller wishes to wait again.