Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InsecureTransport http.RoundTripper = &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, DualStack: true, }).DialContext, TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, TLSHandshakeTimeout: 10 * time.Second, ExpectContinueTimeout: 1 * time.Second, }
InsecureTransport provides a insecure RoundTripper and disable the HTTP2 try.
Functions ¶
This section is empty.
Types ¶
type ClientSet ¶
type ClientSet struct {
// contains filtered or unexported fields
}
ClientSet contains clients for V2, Assist, Legacy
func NewClientSet ¶
func NewClientSet(csc *ClientSetConfig) (*ClientSet, error)
NewAssistClient return assist Client
func (*ClientSet) Assist ¶
func (c *ClientSet) Assist() *assistclient.HarborAPI
Assist return AssistClient
func (*ClientSet) Legacy ¶
func (c *ClientSet) Legacy() *legacyclient.HarborAPI
Legacy return LegacyClient
type ClientSetConfig ¶ added in v0.24.3
ClientSetConfig contains config for creating a ClientSet
type Config ¶
type Config struct { // URL is the base URL of the upstream server URL *url.URL // Transport is an inner transport for the client Transport http.RoundTripper // AuthInfo is for authentication AuthInfo runtime.ClientAuthInfoWriter }
Config contains configs for constructing a client
func (*Config) ToAssistConfig ¶
func (c *Config) ToAssistConfig() assistclient.Config
ToAssistConfig convert the Config to assistclient's Config
func (*Config) ToLegacyConfig ¶
func (c *Config) ToLegacyConfig() legacyclient.Config
ToLegacyConfig convert the Config to legacyclient's Config
func (*Config) ToV2Config ¶
ToV2Config convert the Config to v2client's Config
Click to show internal directories.
Click to hide internal directories.