Documentation ¶
Index ¶
Constants ¶
View Source
const ( ProductStatusNormal = 0 //商品状态正常 ProductStatusSaleOut = 1 //商品售罄 ProductStatusForceSaleOut = 2 //商品强制售罄 )
Variables ¶
View Source
var CoreCtx = &SkAppCtx{}
View Source
var Logger log.Logger
View Source
var SecLayerCtx = &SecLayerContext{ Read2HandleChan: make(chan *SecRequest, 1024), Handle2WriteChan: make(chan *SecResult, 1024), HistoryMap: make(map[int]*srv_user.UserBuyHistory, 1024), ProductCountMgr: srv_product.NewProductCountMgr(), }
View Source
var ZipkinTracer *zipkin.Tracer
Functions ¶
This section is empty.
Types ¶
type SecLayerContext ¶
type SecLayerContext struct { RWSecProductLock sync.RWMutex WaitGroup sync.WaitGroup Read2HandleChan chan *SecRequest Handle2WriteChan chan *SecResult HistoryMap map[int]*srv_user.UserBuyHistory HistoryMapLock sync.Mutex ProductCountMgr *srv_product.ProductCountMgr //商品计数 }
type SecRequest ¶
type SecRequest struct { ProductId int `json:"product_id"` //商品ID Source string `json:"source"` AuthCode string `json:"auth_code"` SecTime int64 `json:"sec_time"` Nance string `json:"nance"` UserId int `json:"user_id"` UserAuthSign string `json:"user_auth_sign"` //用户授权签名 ClientAddr string `json:"client_addr"` ClientRefence string `json:"client_refence"` CloseNotify <-chan bool `json:"-"` ResultChan chan *SecResult `json:"-"` }
Click to show internal directories.
Click to hide internal directories.