本文整理汇总了Golang中github.com/joernweissenborn/eventual2go.StreamController类的典型用法代码示例。如果您正苦于以下问题:Golang StreamController类的具体用法?Golang StreamController怎么用?Golang StreamController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StreamController类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: CallAll
func (i *Import) CallAll(function string, parameter interface{}, s *eventual2go.StreamController) {
i.logger.Println("CallAll", function)
req := i.newRequest(function, parameter, messages.ONE2MANY)
s.Join(i.results.Where(isRes(req.UUID)))
i.Deliver(req)
return
}
开发者ID:joernweissenborn,项目名称:aursir4go,代码行数:7,代码来源:import.go
示例2: serviceGone
func serviceGone(client *eventual2go.StreamController) eventual2go.Subscriber {
return func(d eventual2go.Data) {
s := d.(service.ServiceGone)
if !client.Closed().Completed() {
client.Add(NewServiceGone(s))
}
}
}
开发者ID:joernweissenborn,项目名称:aurarath,代码行数:8,代码来源:daemon.go
示例3: announce
func (a *Announcer) announce(eventual2go.Data) {
a.logger.Println("announcing")
var results *eventual2go.StreamController
if a.servicetype == IMPORTING {
results = eventual2go.NewStreamController()
c := results.AsChan()
go a.collectAnnounceResponses(c)
} else {
a.announced.Complete(nil)
}
a.node.Query(a.servicetype, a.node.UUID, results)
return
}
开发者ID:joernweissenborn,项目名称:aurarath,代码行数:13,代码来源:announcer.go
示例4: waitForQueryFinish
func waitForQueryFinish(s *eventual2go.StreamController, wg *sync.WaitGroup) {
wg.Wait()
s.Close()
}
开发者ID:joernweissenborn,项目名称:aurarath,代码行数:4,代码来源:node.go
示例5: collectResponse
func collectResponse(iface string, resp *serf.QueryResponse, s *eventual2go.StreamController, wg *sync.WaitGroup) {
for r := range resp.ResponseCh() {
s.Add(QueryResponseEvent{iface, r})
}
wg.Done()
}
开发者ID:joernweissenborn,项目名称:aurarath,代码行数:6,代码来源:node.go
示例6: serviceGone
func serviceGone(client *eventual2go.StreamController) eventual2go.Subscriber {
return func(d eventual2go.Data) {
uuid := d.(string)
client.Add(NewServiceGone(uuid))
}
}
开发者ID:YamiNoKeshin,项目名称:aurarath,代码行数:6,代码来源:daemon.go
示例7: serviceArrived
func serviceArrived(client *eventual2go.StreamController) eventual2go.Subscriber {
return func(d eventual2go.Data) {
sa := d.(service.ServiceArrived)
client.Add(NewServiceArrived(sa))
}
}
开发者ID:YamiNoKeshin,项目名称:aurarath,代码行数:6,代码来源:daemon.go
示例8: CallAll
func (i *Import) CallAll(function string, parameter []byte, s *eventual2go.StreamController) {
i.logger.Println("CallAll", function)
uuid := i.call(function, parameter, messages.ONE2MANY)
s.Join(i.results.Where(isRes(uuid)))
return
}
开发者ID:AurSir,项目名称:aurarath,代码行数:6,代码来源:import.go
注:本文中的github.com/joernweissenborn/eventual2go.StreamController类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论