Introduce

作者: loinliao | 来源:发表于2018-03-22 16:01 被阅读0次

nsq_to_file只是一个普通的消费者,获取消息缓存到磁盘
topic 和 channel名字是否合法:

var validTopicChannelNameRegex = regexp.MustCompile(`^[\.a-zA-Z0-9_-]+(#ephemeral)?$`)
func IsValidTopicName(name string) bool {
    return isValidName(name)
}

// IsValidChannelName checks a channel name for correctness
func IsValidChannelName(name string) bool {
    return isValidName(name)
}

func isValidName(name string) bool {
    if len(name) > 64 || len(name) < 1 {
        return false
    }
    return validTopicChannelNameRegex.MatchString(name)
}

相关文章

  • Introduce

    it’s really my honor to have this opportunity for an inte...

  • Introduce

    nsq_to_file只是一个普通的消费者,获取消息缓存到磁盘topic 和 channel名字是否合法:

  • Introduce

    My job is a three-dimensional animator, every day facing ...

  • Introduce myself

    Hello everyone! My name is yejiaixin,you can also call me...

  • Introduce myself

    自我介绍 My name is HUQ...

  • Introduce oneself

    嘿,初次见面请多指教,先自我介绍下。鄙人姓吴,与智多星吴用同姓。今年高一,猜猜我几岁了( ー̀εー́ )好...

  • Introduce  myself

    I am David,Now I am 16 years old.I like playing basketbal...

  • Introduce Myself

    My name is Hengist L , Hengist is my first name and L i...

  • Vue Introduce

    这篇PPT是关于最近在做H5版杭州公交的经验分享,里面部分细节也包括工作一年的总结。 简介 Vue是我在8月份第一...

  • Introduce oneself to

    姓名:袁小亚 身份:学生 坐标:地球中国浙江绍兴新昌 标签:三分钟热度、鱼的记忆、“杂食”动物 我能为你做: 1、...

网友评论

      本文标题:Introduce

      本文链接:https://www.haomeiwen.com/subject/azvaqftx.html