Documentation
¶
Overview ¶
The wrnt package provides send and recv components for guaranteed delivery of string messages with acknowledgment of receipt. Transmission is carried out by the user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotInited = errors.New("not inited")
Functions ¶
This section is empty.
Types ¶
type Recv ¶
type Recv struct {
// contains filtered or unexported fields
}
Recv is receiver-side component that Unpack messages into unique items
type Send ¶
type Send struct {
// contains filtered or unexported fields
}
Send is a send-side component of wrnt package new Send doesn't count as inited before first Confirm call so Confirm with last received item must be guaranteed
func (*Send) AddItems ¶
AddItems add new items to send may be called before initiation all added items are not confirmed and must be sent
func (*Send) Confirm ¶
Confirm the fact of receiving messages up to index N after Confirm call Send is inited
func (*Send) DropNotSent ¶
func (s *Send) DropNotSent()
DropNotSent moves ConfirmedN to the end of storage marking all items as confirmed. by fact, they may be already received or not received but they will never be sent again
type SendMany ¶
type SendMany struct {
// contains filtered or unexported fields
}
func NewSendMany ¶
func (*SendMany) DropNotSent ¶
func (sm *SendMany) DropNotSent()