api

package
v0.0.7-do.not.use Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2025 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// PluginLaunchedByEngineVar is used to inform engine-launched plugins about their name.
	PluginLaunchedByEngineVar = "DOCKER_SECRETS_ENGINE_PLUGIN_LAUNCH_CFG"
	// DefaultPluginRegistrationTimeout is the default timeout for plugin registration.
	DefaultPluginRegistrationTimeout = 5 * time.Second
	// DefaultClientRequestTimeout is the default timeout for clients to handle a request.
	DefaultClientRequestTimeout = time.Duration(0) // 0 means no limit
	// DefaultClientResponseHeaderTimeout is the default timeout for clients to handle
	// header responses, this does not include the response body and usually should
	// be short.
	DefaultClientResponseHeaderTimeout = time.Second
	// DefaultClientTLSHandshakeTimeout is the default timeout for clients to handle
	// tls handshakes. It should usually be short.
	DefaultClientTLSHandshakeTimeout = time.Second
	// DefaultClientIdleConnTimeout is the time a connection may stay alive for.
	// Clients that are long-lived take advantage of re-using the same connection
	// when making subsequent requests. This reduces latency.
	DefaultClientIdleConnTimeout = 90 * time.Second
	// DefaultClientMaxConnsPerHost is the maximum number of open connections
	// to the same host.
	DefaultClientMaxConnsPerHost = 100
	// DefaultClientMaxIdleConnsPerHost is the maximum number of idle connections
	// to the same host. Long-lived clients can re-use a connection from the
	// connection pool.
	DefaultClientMaxIdleConnsPerHost = 10
)

Variables

View Source
var (
	ErrEmptyVersion = errors.New("empty version")
	ErrVPrefix      = errors.New("missing version prefix")
)
View Source
var ErrEmptyName = errors.New("empty name")

Functions

func DefaultSocketPath

func DefaultSocketPath() string

Types

type Name

type Name interface {
	String() string
}

func MustNewName

func MustNewName(s string) Name

MustNewName creates a new Name as NewName does, but panics when a validation error occurs.

func NewName

func NewName(s string) (Name, error)

NewName creates a new Name from a string If a validation error occurs, it returns nil and the error.

type Version

type Version interface {
	String() string
}

func MustNewVersion

func MustNewVersion(s string) Version

MustNewVersion creates a new Version as NewVersion does, but panics when a validation error occurs.

func NewVersion

func NewVersion(s string) (Version, error)

NewVersion creates a new Version from a string If a validation error occurs, it returns nil and the error.

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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