dummy_backend_queue.go
package nsqd
type dummyBackendQueue struct {
readChan chan []byte
}
func newDummyBackendQueue() BackendQueue {
return &dummyBackendQueue{readChan: make(chan []byte)}
}
func (d *dummyBackendQueue) Put([]byte) error {
return nil
}
func (d *dummyBackendQueue) ReadChan() chan []byte {
return d.readChan
}
func (d *dummyBackendQueue) Close() error {
return nil
}
func (d *dummyBackendQueue) Delete() error {
return nil
}
func (d *dummyBackendQueue) Depth() int64 {
return int64(0)
}
func (d *dummyBackendQueue) Empty() error {
return nil
}
dummy_backend_queue.go的更多相关文章
随机推荐
- 3sum(从数组中找出三个数的和为0)
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all un ...
- 《MySQL必知必会》读书笔记_3
PS:这次的信息量有点大. 聚集不同值 SELECT AVG(DISTINCT prod_price) AS avg_price FROM products WHERE vend_id = 1003 ...
- Http持久连接与HttpClient连接池
一.背景 HTTP协议是无状态的协议,即每一次请求都是互相独立的.因此它的最初实现是,每一个http请求都会打开一个tcp socket连接,当交互完毕后会关闭这个连接. HTTP协议是全双工的协议, ...
- How 5 Natural Language Processing APIs Stack Up
https://www.programmableweb.com/news/how-5-natural-language-processing-apis-stack/analysis/2014/07/2 ...
- Apache Flink 流处理实例
维基百科在 IRC 频道上记录 Wiki 被修改的日志,我们可以通过监听这个 IRC 频道,来实时监控给定时间窗口内的修改事件.Apache Flink 作为流计算引擎,非常适合处理流数据,并且,类似 ...
- web.config中的configSource
在大型项目中,可能存在第三方类库的配置如:log4.net,AOP框架Unity,WCF等,或是自定义的配置,造成web.config内容过多,不易维护,影响Config初始化. 这时我们可以使用co ...
- 分享一下 常用的转换方法(例如:数字转金钱,文本与html互转等)
public sealed class SAFCFormater { /// <summary> /// 文本格式到HTML /// </summary> /// <pa ...
- 【leetcode】 算法题 两数之和
问题 给定一个整数数组和一个目标值,找出数组中和为目标值的两个数. 你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用. 示例: 给定 nums = [2, 7, 11, 1 ...
- 五分钟学会centos配置gitlab
下载gitlab 亲测: centos6.5 安装依赖包: : yum install curl policycoreutils policycoreutils-python openssh-serv ...
- web 文件下载(.shp)
1. Open IIS Manager2. Select MIME Types 3. In the right pane, click Add…4. Enter the following infor ...