Esempio n. 1
0
// NewRequest creates a new request helper object for accessing runtime.Objects on a server.
func NewRequest(client HTTPClient, verb string, baseURL *url.URL, groupVersion unversioned.GroupVersion, codec runtime.Codec, backoff BackoffManager) *Request {
	if backoff == nil {
		glog.V(2).Infof("Not implementing request backoff strategy.")
		backoff = &NoBackoff{}
	}
	metrics.Register()
	return &Request{
		client:       client,
		verb:         verb,
		baseURL:      baseURL,
		path:         baseURL.Path,
		groupVersion: groupVersion,
		codec:        codec,
		backoffMgr:   backoff,
	}
}
Esempio n. 2
0
func init() {
	metrics.Register()
}