t4_c7_http_broker

package
v0.0.0-...-63b2ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-2.0 Imports: 6 Imported by: 0

README

Broker

Micro中的broker用于代理消息的发布与订阅。

内容

  • main.go - main程序运行两个协程20秒钟,各自负责发布与订阅消息。

运行程序

如果使用默认的http broker,请运行:

go run main.go

如果想使用其他消息队列服务,例如nats,请运行:

export MICRO_BROKER=nats
go run main.go

或者:

go run main.go --broker=nats

或者:

go run main.go --broker=nats --broker_address=127.0.0.1:4222

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XXbrok broker.Broker
)

Functions

func Main

func Main()

Types

This section is empty.

Jump to

Keyboard shortcuts

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