task

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Nsq

type Nsq struct {
	Topic string
	Body  []byte
	// contains filtered or unexported fields
}

func NewNsq

func NewNsq(addr string, opt ...Options) *Nsq

func (*Nsq) GetProducer

func (p *Nsq) GetProducer() (*nsq.Producer, error)

GetProducer get producer

func (*Nsq) Publish

func (p *Nsq) Publish(topic string, msg []byte) error

Publish publish message

type Options

type Options func(*Nsq)

func WithConfig

func WithConfig(config *nsq.Config) Options

Jump to

Keyboard shortcuts

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