Documentation
¶
Index ¶
- Constants
- func InjectWebClient(s *WebClient)
- func LoadWebClient() baseiface.ISingleton
- type FindWebClientService
- func (this *FindWebClientService) FindWebClient(serviceName string) *WebClient
- func (this *FindWebClientService) FindWebClientDbAgent() *WebClient
- func (this *FindWebClientService) FindWebClientEngine() *WebClient
- func (this *FindWebClientService) FindWebClientEsAgent() *WebClient
- func (this *FindWebClientService) FindWebClientFactroy() *WebClient
- type WebClient
- func Default() *WebClient
- func DefaultStat() *WebClient
- func FindBeanWebClient() *WebClient
- func FindWebClient(serviceName string) *WebClient
- func FindWebClientDbAgent() *WebClient
- func FindWebClientEngine() *WebClient
- func FindWebClientEsAgent() *WebClient
- func FindWebClientFactroy() *WebClient
- func New(clientDto *baseconfig.WebClientDto) *WebClient
- func NewBy(etcdhost, serviceName string) *WebClient
- func NewByServiceName(serviceName string) *WebClient
- func NewIchubWebClient(cfgFile string) *WebClient
- func NewWebClient() *WebClient
- func (webcli *WebClient) Delete(url string) *basedto.IchubResult
- func (webcli *WebClient) DeleteShortUrl(shorturl string) *basedto.IchubResult
- func (webcli *WebClient) EsPostWeb(web *webmsg.WebMsg) (*resty.Response, error)
- func (webcli *WebClient) FindAddress(ServerName string) (address string)
- func (webcli *WebClient) FindAllServices() (s []*registry.Service, err error)
- func (webcli *WebClient) FindEsServer() (address string)
- func (webcli *WebClient) FindServer() (address string)
- func (webcli *WebClient) FindServiceNode() (s *registry.Node)
- func (webcli *WebClient) FindServiceNodeOf(ServerName string) (s *registry.Node)
- func (webcli *WebClient) FindServicesAs(serverName string) (s []*registry.Service, err error)
- func (webcli *WebClient) Get(url string) *basedto.IchubResult
- func (webcli *WebClient) GetServiceAddr() (address string)
- func (webcli *WebClient) GetServiceAddrBy(ServerName string) (address string)
- func (webcli *WebClient) GetServiceAddrPrefix(ServerName string) (address string)
- func (webcli *WebClient) GetServiceAddrs() []*registry.Service
- func (webcli *WebClient) GetServiceAll(serverName string) []*registry.Service
- func (webcli *WebClient) GetWeb(msg *webmsg.WebMsg) *basedto.IchubResult
- func (webcli *WebClient) IfRefreshAddr() bool
- func (webcli *WebClient) Init() *WebClient
- func (webcli *WebClient) InitRestyClient()
- func (webcli *WebClient) Post(body, url string) *basedto.IchubResult
- func (webcli *WebClient) Post2PageResult(web *webmsg.WebMsg) *page.PageResult
- func (webcli *WebClient) Post2Response(body, url string) (*resty.Response, error)
- func (webcli *WebClient) Post2Result(web *webmsg.WebMsg) *basedto.IchubResult
- func (webcli *WebClient) PostBatch(body, url string) *basedto.IchubResults
- func (webcli *WebClient) PostWeb(webMsg *webmsg.WebMsg) *page.PageResult
- func (webcli *WebClient) Put(body, url string) *basedto.IchubResult
- func (webcli *WebClient) ReadCfg()
- func (webcli *WebClient) RefreshAddr() string
- func (webcli *WebClient) Resp2IchubResult(resp *resty.Response, err error) *basedto.IchubResult
- func (webcli *WebClient) Resp2IchubResults(resp *resty.Response, err error) *basedto.IchubResults
- func (webcli *WebClient) Resp2PageResult(resp *resty.Response, err error) *page.PageResult
- func (webcli *WebClient) SetBaseUrl(baseUrl string) string
- func (webcli *WebClient) SetTlsSkip()
- func (webcli *WebClient) Stat() *basedto.IchubResult
- func (webcli *WebClient) StatDisable() *basedto.IchubResult
- func (webcli *WebClient) StatEnable() *basedto.IchubResult
- func (webcli *WebClient) TriggerStat(dto *goperfstat.TriggerStatDto) *basedto.IchubResult
- func (webcli *WebClient) ValueOf(clientDto *baseconfig.WebClientDto)
- func (webcli *WebClient) Web(msg *webmsg.WebMsg) *page.PageResult
Constants ¶
View Source
const ( WEB_SERVER_RULEENGINE = "web.esserver.com" WEB_SERVER_DBAGENT = "web.dbagent.com" WEB_SERVER_ESAGENT = "web.esagent.com" WEB_SERVER_STATSERVER = "web.statserver.com" )
@Title 文件名称: web_client.go @Description 描述: WEB客户端服务发现,支持多个服务
@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)
View Source
const WEB_SEVICE_NAME_DBAGENT = "web.dbagent.com"
View Source
const WEB_SEVICE_NAME_ENGIINE = "web.webclient.com"
View Source
const WEB_SEVICE_NAME_ESAGENT = "web.esserver.com"
View Source
const WEB_SEVICE_NAME_FACTOY = "web.factroy.com"
Variables ¶
This section is empty.
Functions ¶
func InjectWebClient ¶
func InjectWebClient(s *WebClient)
func LoadWebClient ¶
func LoadWebClient() baseiface.ISingleton
Types ¶
type FindWebClientService ¶
type FindWebClientService struct {
// contains filtered or unexported fields
}
func DefaultFind ¶
func DefaultFind() *FindWebClientService
func NewFindWebClientService ¶
func NewFindWebClientService(etcdhost string) *FindWebClientService
func (*FindWebClientService) FindWebClient ¶
func (this *FindWebClientService) FindWebClient(serviceName string) *WebClient
func (*FindWebClientService) FindWebClientDbAgent ¶
func (this *FindWebClientService) FindWebClientDbAgent() *WebClient
func (*FindWebClientService) FindWebClientEngine ¶
func (this *FindWebClientService) FindWebClientEngine() *WebClient
func (*FindWebClientService) FindWebClientEsAgent ¶
func (this *FindWebClientService) FindWebClientEsAgent() *WebClient
func (*FindWebClientService) FindWebClientFactroy ¶
func (this *FindWebClientService) FindWebClientFactroy() *WebClient
type WebClient ¶
type WebClient struct {
basedto.BaseEntity
WebClientType int
// 可测试性 baseurl -> http://xxx.xxx.xxx.xxx:xx
TestUrl string `json:"testUrl"`
EnableTestUrl string `json:"enableTestUrl"`
BaseUrl string `json:"baseUrl"`
//服务名称
ServerName string `json:"serverName"`
// etcd注册服务器地址 xxx.xxx.xxx.xxx:xx
EtcdHosts []string `json:"etcdHosts"`
Registry registry.Registry `json:"-"`
Config *ichubconfig.IchubConfig `json:"-"`
TlsSkip bool
// contains filtered or unexported fields
}
func DefaultStat ¶
func DefaultStat() *WebClient
func FindWebClient ¶
func FindWebClientDbAgent ¶
func FindWebClientDbAgent() *WebClient
func FindWebClientEngine ¶
func FindWebClientEngine() *WebClient
func FindWebClientEsAgent ¶
func FindWebClientEsAgent() *WebClient
func FindWebClientFactroy ¶
func FindWebClientFactroy() *WebClient
func New ¶
func New(clientDto *baseconfig.WebClientDto) *WebClient
func NewByServiceName ¶
func NewIchubWebClient ¶
func NewWebClient ¶
func NewWebClient() *WebClient
func (*WebClient) DeleteShortUrl ¶
func (webcli *WebClient) DeleteShortUrl(shorturl string) *basedto.IchubResult
func (*WebClient) FindAddress ¶
func (*WebClient) FindAllServices ¶
func (*WebClient) FindEsServer ¶
func (*WebClient) FindServer ¶
func (*WebClient) FindServiceNode ¶
func (*WebClient) FindServiceNodeOf ¶
func (*WebClient) FindServicesAs ¶
func (*WebClient) GetServiceAddr ¶
func (*WebClient) GetServiceAddrBy ¶
func (*WebClient) GetServiceAddrPrefix ¶
func (*WebClient) GetServiceAddrs ¶
func (*WebClient) GetServiceAll ¶
func (*WebClient) IfRefreshAddr ¶
func (*WebClient) InitRestyClient ¶
func (webcli *WebClient) InitRestyClient()
func (*WebClient) Post2PageResult ¶
func (webcli *WebClient) Post2PageResult(web *webmsg.WebMsg) *page.PageResult
func (*WebClient) Post2Response ¶
func (*WebClient) Post2Result ¶
func (webcli *WebClient) Post2Result(web *webmsg.WebMsg) *basedto.IchubResult
func (*WebClient) PostBatch ¶
func (webcli *WebClient) PostBatch(body, url string) *basedto.IchubResults
func (*WebClient) PostWeb ¶
func (webcli *WebClient) PostWeb(webMsg *webmsg.WebMsg) *page.PageResult
func (*WebClient) RefreshAddr ¶
func (*WebClient) Resp2IchubResult ¶
func (*WebClient) Resp2IchubResults ¶
func (*WebClient) Resp2PageResult ¶
func (*WebClient) SetBaseUrl ¶
func (*WebClient) SetTlsSkip ¶
func (webcli *WebClient) SetTlsSkip()
func (*WebClient) Stat ¶
func (webcli *WebClient) Stat() *basedto.IchubResult
func (*WebClient) StatDisable ¶
func (webcli *WebClient) StatDisable() *basedto.IchubResult
func (*WebClient) StatEnable ¶
func (webcli *WebClient) StatEnable() *basedto.IchubResult
func (*WebClient) TriggerStat ¶
func (webcli *WebClient) TriggerStat(dto *goperfstat.TriggerStatDto) *basedto.IchubResult
func (*WebClient) ValueOf ¶
func (webcli *WebClient) ValueOf(clientDto *baseconfig.WebClientDto)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
eswebrequest
@Time : 2021/10/19 20:31 @Author : Jasper @File : CmsListEs @Software: GoLand
|
@Time : 2021/10/19 20:31 @Author : Jasper @File : CmsListEs @Software: GoLand |
Click to show internal directories.
Click to hide internal directories.