ack

package
v2.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestTimeout = errors.New("ack: timeout")
	ErrConnClose      = errors.New("ack: connection closed")
)

Functions

func Event

func Event(event string) string

func IsAckEvent

func IsAckEvent(event string) bool

Types

type Acker

type Acker struct {
	// contains filtered or unexported fields
}

func NewAcker

func NewAcker(reqCtx context.Context, closeCh chan struct{}) *Acker

func (*Acker) Await

func (a *Acker) Await() ([]byte, error)

func (*Acker) Notify

func (a *Acker) Notify(data []byte)

type Ackers

type Ackers struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewAckers

func NewAckers() *Ackers

func (*Ackers) RegisterAck

func (a *Ackers) RegisterAck(reqId uint64, reqCtx context.Context, closeCh chan struct{}) *Acker

func (*Ackers) TryAck

func (a *Ackers) TryAck(reqId uint64, data []byte) bool

func (*Ackers) UnregisterAck

func (a *Ackers) UnregisterAck(reqId uint64)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL