Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Name is a constant of type string Name = "rest" // FailureTypePrefix is a constant of type string FailureTypePrefix = "http_" //DefaultTimeoutBySecond defines the default timeout for http connections DefaultTimeoutBySecond = 60 * time.Second //DefaultKeepAliveSecond defines the connection time DefaultKeepAliveSecond = 60 * time.Second //DefaultMaxConnsPerHost defines the maximum number of concurrent connections DefaultMaxConnsPerHost = 512 //SchemaHTTP represents the http schema SchemaHTTP = "http" //SchemaHTTPS represents the https schema SchemaHTTPS = "https" )
Variables ¶
View Source
var ( //ErrInvalidResp invalid input ErrInvalidResp = errors.New("rest consumer response arg is not *rest.Response type") )
Functions ¶
func NewRequest ¶
NewRequest is a function which creates new request
func NewRestClient ¶
func NewRestClient(opts client.Options) (client.ProtocolClient, error)
NewRestClient is a function
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a struct
func (*Client) Call ¶
func (c *Client) Call(ctx context.Context, addr string, inv *invocation.Invocation, rsp interface{}) error
Call is a method which uses client struct object
func (*Client) GetOptions ¶ added in v1.3.0
GetOptions method return opts
func (*Client) ReloadConfigs ¶ added in v1.3.0
ReloadConfigs reload configs for timeout and tls
Click to show internal directories.
Click to hide internal directories.