service

package
v0.0.0-...-99cece9 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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