Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGetUserInfoFailed = errors.New("get user info failed")
View Source
var ErrNoSuchProduct = errors.New("no such product")
Functions ¶
This section is empty.
Types ¶
type ConsumerMsg ¶
type Producer ¶
type Producer struct {
Producer *nsq.Producer
}
func NewPublisher ¶
func (*Producer) Produce ¶
func (p *Producer) Produce(msg ProducerMsg) error
type ProducerMsg ¶
type ProductManage ¶
type ProductManage struct {
ProductService productservice.Client
}
func (*ProductManage) GetProductInfo ¶
func (*ProductManage) UpdateStock ¶
func (p *ProductManage) UpdateStock(ctx context.Context, pid, stock int64) error
type UserManager ¶
type UserManager struct {
UserService userservice.Client
}
func (UserManager) GetUserInfo ¶
func (u UserManager) GetUserInfo(ctx context.Context, uid int64) error
Click to show internal directories.
Click to hide internal directories.