示例#1
0
文件: api.go 项目: AaronO/lightwave
func NewUniAPI(userid string, grapher *grapher.Grapher) API {
	a := &uniAPI{userID: userid, grapher: grapher, open: make(map[string]int64), queues: make(map[string]int64)}
	grapher.SetAPI(a)
	return a
}
示例#2
0
func NewLatestTransformer(grapher *grapher.Grapher) grapher.Transformer {
	t := &latestTransformer{grapher: grapher}
	grapher.AddTransformer(t)
	return t
}
示例#3
0
func newChannelAPI(c appengine.Context, store *store, userid string, sessionid string, bufferOnly bool, grapher *grapher.Grapher) *channelAPI {
	a := &channelAPI{sessionID: sessionid, store: store, userID: userid, c: c, bufferOnly: bufferOnly, grapher: grapher}
	grapher.SetAPI(a)
	return a
}