This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Filter 注册的filter,用于在server端过滤数据并提供高性能查询 | |
type Filter struct { | |
KeyFileds []string | |
FilterStr string // 更新无极数据时用到的,注册的filter条件 | |
Template interface{} // 返回数据类型模板 | |
// objStore 用于Filter后数据的存储 | |
objStore map[string]interface{} | |
objStoreMutex *sync.RWMutex | |
dataVersion int // 当前内存中无极数据的版本 | |
stat *Stat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"github.com/streadway/amqp" | |
"time" | |
"os" | |
"errors" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"time" | |
) | |
func main() { | |
queue := NewQueue("amqp://guest:guest@localhost:5672/", "hello") |