code: func OnConnect(memif *libmemif.Memif) (err error) {
  	// Use Memif.GetDetails to get the number of queues.
  	details, err := memif.GetDetails()
  	if err != nil {
  		fmt.Printf("libmemif.GetDetails() error: %v\n", err)
  		return
  	}
  
  	fmt.Printf("memif %s has been connected: %+v\n", memif.IfName, details)
  	stopCh = make(chan struct{})
  
  	// Start a separate go routine for each RX queue.
  	// (memif queue is a unit of parallelism for Rx/Tx).
  	// Beware: the number of queues created may be lower than what was requested
  	// in MemifConfiguration (the master makes the final decision).
  	for _, queue := range details.RxQueues {
  		ch, err := memif.GetQueueInterruptChan(queue.QueueID)
  		if err != nil {
  			fmt.Printf("libmemif.Memif.GetQueueInterruptChan() error %v\n", err)
  			continue
  		}
  
  		go CreateInterruptCallback(memif.NewPacketHandle(queue.QueueID, 10), ch, OnInterrupt)
  	}
  
  	return
  }
docs: // OnConnect is called when a memif connection gets established.