Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultURLClientOption = &URLClientOption{ Compressed: true, HandshakeTimeout: 30 * time.Second, ResponseHeaderTimeout: 60 * time.Second, }
DefaultURLClientOption is a struct object which has default client option
View Source
var SignRequest func(*http.Request) error
SignRequest sign a http request so that it can talk to API Server
Functions ¶
This section is empty.
Types ¶
type HTTPRequest ¶
HTTPRequest is used structure used to unmarshal message content from clous
type HTTPResponse ¶
type HTTPResponse struct { Header http.Header `json:"header"` StatusCode int `json:"status_code"` Body []byte `json:"body"` }
HTTPResponse is HTTP request's response structure used to send response to cloud
type URLClient ¶
type URLClient struct { *http.Client TLS *tls.Config Request *http.Request // contains filtered or unexported fields }
URLClient is a struct used for storing details of a client
func GetURLClient ¶
func GetURLClient(option *URLClientOption) (client *URLClient, err error)
GetURLClient is a function which sets client options
Click to show internal directories.
Click to hide internal directories.