webclient

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MulanPSL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IchubWebClient

type IchubWebClient struct {
	//服务名称
	ServerName string
	// 可测试性 baseurl -> http://xxx.xxx.xxx.xxx:xx
	TestUrl, BaseUrl string

	// etcd注册服务器地址  xxx.xxx.xxx.xxx:xx
	EtcdHost string
	Registry registry.Registry `json:"-"`
}

func NewIchubWebClient

func NewIchubWebClient() *IchubWebClient

func NewWebClient

func NewWebClient(clientDto *baseconfig.WebClientDto) *IchubWebClient

func (*IchubWebClient) Check

func (client *IchubWebClient) Check(suite suite.Suite, ichubResult *basedto.IchubResult, key string, exp interface{})

func (*IchubWebClient) Get

func (client *IchubWebClient) Get(url string) *basedto.IchubResult

func (*IchubWebClient) GetServiceAddr

func (client *IchubWebClient) GetServiceAddr() (address string)

func (*IchubWebClient) GetServiceAddrBy

func (client *IchubWebClient) GetServiceAddrBy(ServerName string) (address string)

func (*IchubWebClient) GetServiceAddrs

func (client *IchubWebClient) GetServiceAddrs() []*registry.Service

func (*IchubWebClient) Init

func (client *IchubWebClient) Init() *IchubWebClient

func (*IchubWebClient) Post

func (client *IchubWebClient) Post(body, url string) *basedto.IchubResult

func (*IchubWebClient) PostBatch

func (client *IchubWebClient) PostBatch(body, url string) *basedto.IchubResults

func (*IchubWebClient) ReadCfg

func (client *IchubWebClient) ReadCfg()

func (*IchubWebClient) RefreshAddr

func (client *IchubWebClient) RefreshAddr()

func (*IchubWebClient) Register

func (client *IchubWebClient) Register() *IchubWebClient

func (*IchubWebClient) Resp2IchubResult

func (client *IchubWebClient) Resp2IchubResult(resp *req.Resp, err error) *basedto.IchubResult

func (*IchubWebClient) Resp2IchubResults

func (client *IchubWebClient) Resp2IchubResults(resp *req.Resp, err error) *basedto.IchubResults

func (*IchubWebClient) SetBaseUrl

func (client *IchubWebClient) SetBaseUrl(baseUrl string) string

func (*IchubWebClient) String

func (client *IchubWebClient) String() string

func (*IchubWebClient) ValueOf

func (client *IchubWebClient) ValueOf(clientDto *baseconfig.WebClientDto)

Jump to

Keyboard shortcuts

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