webclient

package
v1.0.1-rel-02 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 21 Imported by: 0

Documentation

Index

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 Default

func Default() *WebClient

func DefaultStat

func DefaultStat() *WebClient

func FindBeanWebClient

func FindBeanWebClient() *WebClient

FindBeanWebClient

func FindWebClient

func FindWebClient(serviceName string) *WebClient

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 NewBy

func NewBy(etcdhost, serviceName string) *WebClient

func NewByServiceName

func NewByServiceName(serviceName string) *WebClient

func NewIchubWebClient

func NewIchubWebClient(cfgFile string) *WebClient

func NewWebClient

func NewWebClient() *WebClient

func (*WebClient) Delete

func (webcli *WebClient) Delete(url string) *basedto.IchubResult

func (*WebClient) DeleteShortUrl

func (webcli *WebClient) DeleteShortUrl(shorturl string) *basedto.IchubResult

func (*WebClient) EsPostWeb

func (webcli *WebClient) EsPostWeb(web *webmsg.WebMsg) (*resty.Response, error)

func (*WebClient) FindAddress

func (webcli *WebClient) FindAddress(ServerName string) (address string)

func (*WebClient) FindAllServices

func (webcli *WebClient) FindAllServices() (s []*registry.Service, err error)

func (*WebClient) FindEsServer

func (webcli *WebClient) FindEsServer() (address string)

func (*WebClient) FindServer

func (webcli *WebClient) FindServer() (address string)

func (*WebClient) FindServiceNode

func (webcli *WebClient) FindServiceNode() (s *registry.Node)

func (*WebClient) FindServiceNodeOf

func (webcli *WebClient) FindServiceNodeOf(ServerName string) (s *registry.Node)

func (*WebClient) FindServicesAs

func (webcli *WebClient) FindServicesAs(serverName string) (s []*registry.Service, err error)

func (*WebClient) Get

func (webcli *WebClient) Get(url string) *basedto.IchubResult

func (*WebClient) GetServiceAddr

func (webcli *WebClient) GetServiceAddr() (address string)

func (*WebClient) GetServiceAddrBy

func (webcli *WebClient) GetServiceAddrBy(ServerName string) (address string)

func (*WebClient) GetServiceAddrPrefix

func (webcli *WebClient) GetServiceAddrPrefix(ServerName string) (address string)

func (*WebClient) GetServiceAddrs

func (webcli *WebClient) GetServiceAddrs() []*registry.Service

func (*WebClient) GetServiceAll

func (webcli *WebClient) GetServiceAll(serverName string) []*registry.Service

func (*WebClient) GetWeb

func (webcli *WebClient) GetWeb(msg *webmsg.WebMsg) *basedto.IchubResult

func (*WebClient) IfRefreshAddr

func (webcli *WebClient) IfRefreshAddr() bool

func (*WebClient) Init

func (webcli *WebClient) Init() *WebClient

func (*WebClient) InitRestyClient

func (webcli *WebClient) InitRestyClient()

func (*WebClient) Post

func (webcli *WebClient) Post(body, url string) *basedto.IchubResult

func (*WebClient) Post2PageResult

func (webcli *WebClient) Post2PageResult(web *webmsg.WebMsg) *page.PageResult

func (*WebClient) Post2Response

func (webcli *WebClient) Post2Response(body, url string) (*resty.Response, error)

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) Put

func (webcli *WebClient) Put(body, url string) *basedto.IchubResult

func (*WebClient) ReadCfg

func (webcli *WebClient) ReadCfg()

func (*WebClient) RefreshAddr

func (webcli *WebClient) RefreshAddr() string

func (*WebClient) Resp2IchubResult

func (webcli *WebClient) Resp2IchubResult(resp *resty.Response, err error) *basedto.IchubResult

func (*WebClient) Resp2IchubResults

func (webcli *WebClient) Resp2IchubResults(resp *resty.Response, err error) *basedto.IchubResults

func (*WebClient) Resp2PageResult

func (webcli *WebClient) Resp2PageResult(resp *resty.Response, err error) *page.PageResult

func (*WebClient) SetBaseUrl

func (webcli *WebClient) SetBaseUrl(baseUrl string) string

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)

func (*WebClient) Web

func (webcli *WebClient) Web(msg *webmsg.WebMsg) *page.PageResult

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

Jump to

Keyboard shortcuts

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