feign

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoBalance

func DoBalance(balanceType string, urls []string) (string, error)

Types

type Balance

type Balance interface {
	DoBalance(urls []string) (string, error)
}

type BalanceManager

type BalanceManager struct {
	// contains filtered or unexported fields
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(eurekaClient *eureka.Client) *Client

func (*Client) Body

func (c *Client) Body(body interface{}) *Client

func (*Client) Get

func (c *Client) Get(rawURL string) *Result

func (*Client) Header

func (c *Client) Header(k, v string) *Client

func (*Client) Params

func (c *Client) Params(p map[string]string) *Client

func (*Client) Post

func (c *Client) Post(rawURL string) *Result

func (*Client) SetResult

func (c *Client) SetResult(result interface{}) *Client

type RandomBalance

type RandomBalance struct {
}

func (*RandomBalance) DoBalance

func (b *RandomBalance) DoBalance(urls []string) (string, error)

type Result

type Result struct {
	Resp *resty.Response
	Err  error
}

type RoundRobinBalance

type RoundRobinBalance struct {
	// contains filtered or unexported fields
}

func (*RoundRobinBalance) DoBalance

func (b *RoundRobinBalance) DoBalance(urls []string) (string, error)

Jump to

Keyboard shortcuts

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