示例#1
0
func NewResponder(exitChan chan bool, cdrSrv *CdrServer, stats StatsInterface, timeout, timeToLive time.Duration) *Responder {
	return &Responder{
		ExitChan:      exitChan,
		Stats:         stats,
		Timeout:       timeToLive,
		responseCache: cache2go.NewResponseCache(timeToLive),
	}
}
示例#2
0
func (rs *Responder) getCache() *cache2go.ResponseCache {
	if rs.responseCache == nil {
		rs.responseCache = cache2go.NewResponseCache(0)
	}
	return rs.responseCache
}
示例#3
0
文件: cdrs.go 项目: eloycoto/cgrates
func (self *CdrServer) getCache() *cache2go.ResponseCache {
	if self.responseCache == nil {
		self.responseCache = cache2go.NewResponseCache(0)
	}
	return self.responseCache
}
示例#4
0
func (rs *Responder) SetTimeToLive(timeToLive time.Duration, out *int) error {
	rs.responseCache = cache2go.NewResponseCache(timeToLive)
	return nil
}
示例#5
0
文件: cdrs.go 项目: eloycoto/cgrates
func (self *CdrServer) SetTimeToLive(timeToLive time.Duration, out *int) error {
	self.responseCache = cache2go.NewResponseCache(timeToLive)
	return nil
}