Documentation
¶
Index ¶
- Constants
- Variables
- func NewReadWriter(pipe *utils.Pipeline[[]byte], sender func([]byte) error) io.ReadWriteCloser
- type AckReceiver
- type ErrorCallbackFunc
- type Receiver
- type Sender
- func (s *Sender) AckReceived(seqId int64)
- func (s *Sender) EnqueueAck(messageType string, ackedMsgId uuid.UUID, ackedSequenceNumber int64)
- func (s *Sender) EnqueueChannelOpen(token string)
- func (s *Sender) EnqueueControlFlag(flagType mgsproto.FlagMessage) error
- func (s *Sender) EnqueueData(data []byte) error
- func (s *Sender) SerializeAndEnqueueControl(msgType mgsproto.PayloadType, data any) error
- func (s *Sender) Shutdown()
- type WsConn
Constants ¶
View Source
const MaxResendNum = 1000
View Source
const PingTimeInterval = 30 * time.Second
Variables ¶
View Source
var ErrTooManyRetries = fmt.Errorf("too many unacknowledged retries")
Functions ¶
func NewReadWriter ¶
Types ¶
type AckReceiver ¶
type ErrorCallbackFunc ¶
type ErrorCallbackFunc func(err error)
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
func NewReceiver ¶
func NewReceiver(conn WsConn, onErrorCallback ErrorCallbackFunc, acks AckReceiver, logger *log.GimletLogger, stats *log.Stats) *Receiver
func (*Receiver) ControlReaderQueue ¶
func (r *Receiver) ControlReaderQueue() *utils.Pipeline[*mgsproto.ClientMessage]
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
func NewSender ¶
func NewSender(conn WsConn, onErrorCallback ErrorCallbackFunc, maxPps uint64, resendTimeout time.Duration, log *log.GimletLogger, stats *log.Stats) *Sender
func (*Sender) AckReceived ¶
func (*Sender) EnqueueAck ¶
func (*Sender) EnqueueChannelOpen ¶
func (*Sender) EnqueueControlFlag ¶
func (s *Sender) EnqueueControlFlag(flagType mgsproto.FlagMessage) error
func (*Sender) EnqueueData ¶
func (*Sender) SerializeAndEnqueueControl ¶
func (s *Sender) SerializeAndEnqueueControl(msgType mgsproto.PayloadType, data any) error
Click to show internal directories.
Click to hide internal directories.