harbor

package
v0.210.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 16

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

func NewClientSet

func NewClientSet(csc *ClientSetConfig) (*ClientSet, error)

func (*ClientSet) V2

func (c *ClientSet) V2() *v2client.HarborAPI

V2 return V2Client

type ClientSetConfig added in v0.24.3

type ClientSetConfig struct {
	URL      string
	Insecure bool
	Username string
	Password string
}

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) ToV2Config

func (c *Config) ToV2Config() v2client.Config

ToV2Config convert the Config to v2client's Config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL