Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultProfileName = "default"
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the full path to a profile's JSON file.
func EnsureConfigDir ¶
func EnsureConfigDir() error
EnsureConfigDir creates the config directory if it does not exist.
Types ¶
type Option ¶ added in v1.10.0
type Option func(*clientConfig)
Option configures the client a profile builds.
func WithMaxConcurrency ¶ added in v1.10.0
WithMaxConcurrency sizes the connection pool to the number of requests the caller intends to have in flight at once.
Without it the transport keeps Go's default of two idle connections per host, so a run that uploads dozens of files at a time closes all but two of its connections the moment they go idle and opens fresh ones — paying a DNS lookup, a TCP connect and a TLS handshake per file that the API never sees in its own timings.
type Profile ¶
type Profile struct {
Endpoint string `json:"endpoint"`
CreatedAt time.Time `json:"createdAt"`
Version *string `json:"version"`
Credentials string `json:"credentials"`
}
Profile represents a CLI profile's settings.
Click to show internal directories.
Click to hide internal directories.