go_order_processing_queue

package module
v0.0.0-...-cdd3860 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 11 Imported by: 0

README

go-order-processing_queue

Order processing system with golang use go-nsq

Usage

go test --cmd sender --nsqd_address 127.0.0.1

go test --cmd consumer --nsqd_address 127.0.0.1

NSQD

docker-compose with nsqd change hostname & broadcast address to use

Documentation

Index

Constants

View Source
const (
	FlagCMD         = "cmd"
	FlagNSQDAddress = "nsqd_address"
)

Variables

This section is empty.

Functions

func Start

func Start()

Types

type OrderData

type OrderData struct {
	UserName   string  `json:"user_name"`
	OrderID    string  `json:"order_id"`
	OrderType  string  `json:"order_type"`
	OrderState int     `json:"order_state"` // 0.default 1.processing 2.complete 3.rollback
	Memo       string  `json:"memo"`
	Money      float64 `json:"money"`
}

Jump to

Keyboard shortcuts

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