Documentation ¶
Index ¶
- Variables
- type GoodsDetailServiceImpl
- func (service *GoodsDetailServiceImpl) DiscoveryService(ctx context.Context, serviceName string) ([]*discovery.InstanceInfo, error)
- func (service *GoodsDetailServiceImpl) GetGoodsComments(ctx context.Context, id string) (common.CommentResult, error)
- func (service *GoodsDetailServiceImpl) GetGoodsDetail(ctx context.Context, id string) (GoodsDetailVO, error)
- func (service *GoodsDetailServiceImpl) HealthCheck() string
- func (service *GoodsDetailServiceImpl) InitConfig(ctx context.Context)
- type GoodsDetailVO
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrLoadBalancer = errors.New("loadbalancer select instance error")
View Source
var ErrNotServiceInstances = errors.New("instances are not existed")
Functions ¶
This section is empty.
Types ¶
type GoodsDetailServiceImpl ¶
type GoodsDetailServiceImpl struct {
// contains filtered or unexported fields
}
func (*GoodsDetailServiceImpl) DiscoveryService ¶
func (service *GoodsDetailServiceImpl) DiscoveryService(ctx context.Context, serviceName string) ([]*discovery.InstanceInfo, error)
func (*GoodsDetailServiceImpl) GetGoodsComments ¶
func (service *GoodsDetailServiceImpl) GetGoodsComments(ctx context.Context, id string) (common.CommentResult, error)
func (*GoodsDetailServiceImpl) GetGoodsDetail ¶
func (service *GoodsDetailServiceImpl) GetGoodsDetail(ctx context.Context, id string) (GoodsDetailVO, error)
func (*GoodsDetailServiceImpl) HealthCheck ¶
func (service *GoodsDetailServiceImpl) HealthCheck() string
func (*GoodsDetailServiceImpl) InitConfig ¶
func (service *GoodsDetailServiceImpl) InitConfig(ctx context.Context)
type GoodsDetailVO ¶
type GoodsDetailVO struct { Id string Name string Comments common.CommentListVO }
type Service ¶
type Service interface { GetGoodsDetail(ctx context.Context, id string) (GoodsDetailVO, error) HealthCheck() string }
func NewGoodsServiceImpl ¶
func NewGoodsServiceImpl(discoveryClient *discovery.DiscoveryClient, loadbalancer loadbalancer.LoadBalancer) Service
Click to show internal directories.
Click to hide internal directories.