code: func NewPayloadsBuffer(next uint64) PayloadsBuffer {
  	return &PayloadsBufferImpl{
  		buf:       make(map[uint64]*proto.Payload),
  		readyChan: make(chan struct{}, 1),
  		next:      next,
  		logger:    util.GetLogger(util.StateLogger, ""),
  	}
  }
docs: // NewPayloadsBuffer is factory function to create new payloads buffer