Documentation ¶
Index ¶
- func GetConsumer(name string, opts ...consumer.Option) (rocketmq.PushConsumer, error)
- func GetProducer(name string, opts ...producer.Option) (rocketmq.Producer, error)
- func NewConsumer(c *ConsumerConfig) (rocketmq.PushConsumer, error)
- func NewProducer(c *ProducerConfig) (rocketmq.Producer, error)
- func SetupLogger(level log.Level, pname string)
- type ConsumerConfig
- type ProducerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConsumer ¶
func GetProducer ¶
func NewConsumer ¶
func NewConsumer(c *ConsumerConfig) (rocketmq.PushConsumer, error)
func NewProducer ¶
func NewProducer(c *ProducerConfig) (rocketmq.Producer, error)
func SetupLogger ¶
Types ¶
type ConsumerConfig ¶
type ConsumerConfig struct { NameSrvAddr []string `json:"name_srv_addr" yaml:"name_srv_url"` // name srv地址 GroupName string `json:"group_name,omitempty" yaml:"group_name"` // 组名 ConsumerModel int `json:"consumer_model,omitempty" yaml:"consumer_model"` // 0-广播模式 1-集群模式 UseCredentials bool `json:"use-credentials,omitempty" yaml:"use_credentials"` // 是否需要身份验证 AccessKey string `json:"access_key,omitempty" yaml:"access_key"` // AccessKey 阿里云身份验证,在阿里云服务器管理控制台创建 SecretKey string `json:"secret_key,omitempty" yaml:"secret_key"` // SecretKey 阿里云身份验证,在阿里云服务器管理控制台创建 ConsumerOrder bool `json:"consumer_order,omitempty" yaml:"consumer_order"` // 是否顺序消费 }
type ProducerConfig ¶
type ProducerConfig struct { NameSrvAddr []string `json:"name_srv_addr" yaml:"name_srv_addr"` UseCredentials bool `json:"use_credentials,omitempty" yaml:"use_credentials"` AccessKey string `json:"access_key,omitempty" yaml:"access_key"` SecretKey string `json:"secret_key,omitempty" yaml:"secret_key"` Group string `json:"group,omitempty" yaml:"group"` }
Click to show internal directories.
Click to hide internal directories.