github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/queue.go (about)

     1  package network
     2  
     3  // MessageQueue is the interface of the inbound message queue
     4  type MessageQueue interface {
     5  	// Insert inserts the message in queue
     6  	Insert(message interface{}) error
     7  	// Remove removes the message from the queue in priority order. If no message is found, this call blocks.
     8  	// If two messages have the same priority, items are de-queued in insertion order
     9  	Remove() interface{}
    10  	// Len gives the current length of the queue
    11  	Len() int
    12  }