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 ¶
func GetX509CACertPool ¶
GetX509CACertPool is a function used to get certificate
func LoadTLSCertificate ¶
func LoadTLSCertificate(certFile, keyFile, passphase string, cipher security.Cipher) ([]tls.Certificate, error)
LoadTLSCertificate is a function used to load a certificate
Types ¶
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 which sets client option
Click to show internal directories.
Click to hide internal directories.