sand

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts ...Opt) *client

func TlsConfig

func TlsConfig(ca, cert, key string) (*tls.Config, error)

Types

type Client

type Client interface {
	Version(context.Context) (string, error)
	NetworksList(context.Context) ([]types.Network, error)
	NetworkCreate(context.Context, params.NetworkCreate) (types.Network, error)
	NetworkShow(context.Context, string) (types.Network, error)
	NetworkConnect(context.Context, string, params.NetworkConnect) (net.Conn, error)
	NetworkDelete(context.Context, string) error
	EndpointCreate(context.Context, params.EndpointCreate) (types.Endpoint, error)
	EndpointsList(context.Context, params.EndpointsList) ([]types.Endpoint, error)
	EndpointDelete(context.Context, string) error
	NewHTTPRoundTripper(ctx context.Context, id string, opts HTTPRoundTripperOpts) http.RoundTripper
}

type HTTPRoundTripperOpts added in v0.5.2

type HTTPRoundTripperOpts struct {
	TLSConfig *tls.Config
}

type Opt

type Opt func(c *client)

func WithHttpClient

func WithHttpClient(hc *http.Client) Opt

func WithTimeout added in v0.7.0

func WithTimeout(t time.Duration) Opt

func WithTlsConfig

func WithTlsConfig(config *tls.Config) Opt

func WithURL

func WithURL(url string) Opt

Jump to

Keyboard shortcuts

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