xnsq

package
v0.0.0-...-953156a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NSQInit

func NSQInit(conf *ProducerConfig)

NSQInit NSQInit

Types

type NsqNodeConfig

type NsqNodeConfig struct {
	Host  string `yaml:"Host" json:"Host"`
	Topic string `yaml:"Topic" json:"Topic"`
	IsRun int    `yaml:"IsRun" json:"IsRun"` //0 # 1 停止推送
}

NsqNodeConfig NsqNodeConfig

func (*NsqNodeConfig) GetHost

func (h *NsqNodeConfig) GetHost() string

GetHost GetHost

type ProducerClient

type ProducerClient struct {
	// contains filtered or unexported fields
}

ProducerClient ProducerClient

func NSQ

func NSQ(name string) (*ProducerClient, error)

NSQ NSQ

func (*ProducerClient) Publish

func (p *ProducerClient) Publish(v []byte) error

Publish PublishJSON

func (*ProducerClient) PublishAsyncJSON

func (p *ProducerClient) PublishAsyncJSON(v interface{}) error

PublishAsyncJSON PublishAsync

func (*ProducerClient) PublishJSON

func (p *ProducerClient) PublishJSON(v interface{}) error

PublishJSON PublishJSON

type ProducerConfig

type ProducerConfig map[string]*NsqNodeConfig

func (ProducerConfig) Get

func (h ProducerConfig) Get(name string) *NsqNodeConfig

Get get conf

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL