• go语言nsq源码解读九 tcp和http中channel、topic的增删


    通过前面多篇文章,nsqlookupd基本已经解读完毕了,不过在关于channel和topic的增删上还比较模糊,所以本篇将站在宏观的角度来总结一下,tcp.go和http.go两个文件中关于channel和topic的操作有哪些。

    总结如下表:

    模块文件所在方法名调用方法Registration
    CategoryKeySubKey
    TCPlookup_protocol_v1.goREGISTERAddProducer“channel”topicchannel
    AddProducer“topic”topic“”
    UNREGISTERRemoveProducer“channel”topicchannel
    RemoveProducer“channel”topic“*”
    RemoveProducer“topic”topic“”
    IDENTIFYAddProducer“client”“”“”
    HTTPhttp.gotopicsHandlerFindRegistrations“topic”“*”“”
    channelsHandlerFindRegistrations“channel”topicName“*”
    lookupHandlerFindRegistrations“channel”topicName“*”
    FindRegistrations“topic”topicName“”
    createTopicHandlerAddRegistration“topic”topicName“”
    deleteTopicHandlerRemoveRegistration“channel”topicName“*”
    RemoveRegistration“topic”topicName“”
    tombstoneTopicProducerHandlerFindProducers“topic”topicName“”
    createChannelHandlerAddRegistration“channel”topicNamechannelName
    AddRegistration“topic”topicName“”
    deleteChannelHandlerRemoveRegistration“channel”topicNamechannelName
    nodesHandlerFindProducers“client”“”“”
    LookupRegistrations“topic”“*”“”
    FindProducers“topic”t“”

  • 相关阅读:
    CodeForces 288A Polo the Penguin and Strings (水题)
    CodeForces 289B Polo the Penguin and Matrix (数学,中位数)
    CodeForces 289A Polo the Penguin and Segments (水题)
    CodeForces 540C Ice Cave (BFS)
    网站后台模板
    雅图CAD
    mbps
    WCF学习-协议绑定
    数据库建表经验总结
    资源位置
  • 原文地址:https://www.cnblogs.com/zhangboyu/p/7457025.html
Copyright © 2020-2023  润新知