Documentation
¶
Index ¶
- Constants
- func CloneRetryableClient(c *retryablehttp.Client) *retryablehttp.Client
- func ParseProxy(proxyString string) (func(r *http.Request) (*url.URL, error), error)
- func RedactHttpError(err error) error
- func RedactUrl(u *url.URL) *url.URL
- func SetDefaultNetworkClientSettings(opts *ClientOptions) error
- type AccessTokenFunc
- type Client
- type ClientOptions
- type CommandTransport
- type DockerParams
- type HttpTransportOption
- type MakeDialer
- type MakeRoundTripper
- type SshParams
- type TygerClient
- type TygerConnectionType
Constants ¶
View Source
const ( DefaultControlPlaneUnixSocketPath = "/opt/tyger/api.sock" DefaultControlPlaneUnixSocketUrl = "http+unix://" + DefaultControlPlaneUnixSocketPath + ":" )
Variables ¶
This section is empty.
Functions ¶
func CloneRetryableClient ¶
func CloneRetryableClient(c *retryablehttp.Client) *retryablehttp.Client
func ParseProxy ¶
func RedactHttpError ¶
If the error is a *url.Error, redact the query string values in the error
func SetDefaultNetworkClientSettings ¶
func SetDefaultNetworkClientSettings(opts *ClientOptions) error
Types ¶
type Client ¶
type Client struct { *retryablehttp.Client // contains filtered or unexported fields }
var ( DefaultClient *Client DefaultRetryableClient *retryablehttp.Client )
func NewClient ¶
func NewClient(opts *ClientOptions) (*Client, error)
func NewControlPlaneClient ¶
func NewControlPlaneClient(opts *ClientOptions) (*Client, error)
func NewDataPlaneClient ¶
func NewDataPlaneClient(opts *ClientOptions) (*Client, error)
type ClientOptions ¶
type ClientOptions struct { ProxyString string CreateTransport MakeRoundTripper CreateDialer MakeDialer DisableRetries bool DisableTlsCertificateValidation bool }
type CommandTransport ¶
type CommandTransport struct {
// contains filtered or unexported fields
}
type DockerParams ¶
func ParseDockerUrl ¶
func ParseDockerUrl(u *url.URL) (*DockerParams, error)
func (*DockerParams) FormatCmdLine ¶
func (p *DockerParams) FormatCmdLine(add ...string) []string
func (*DockerParams) FormatLoginArgs ¶
func (sp *DockerParams) FormatLoginArgs(add ...string) []string
func (*DockerParams) String ¶
func (sp *DockerParams) String() string
func (*DockerParams) URL ¶
func (p *DockerParams) URL() *url.URL
type HttpTransportOption ¶
type MakeDialer ¶
type MakeDialer func(next dialContextFunc) dialContextFunc
type MakeRoundTripper ¶
type MakeRoundTripper func(next http.RoundTripper) http.RoundTripper
func MakeCommandTransport ¶
func MakeCommandTransport(concurrencyLimit int, command string, args ...string) MakeRoundTripper
type SshParams ¶
type SshParams struct { Host string Port string User string SocketPath string CliPath string Options map[string]string }
func (*SshParams) FormatCmdLine ¶
func (*SshParams) FormatDataPlaneCmdLine ¶
func (*SshParams) FormatLoginArgs ¶
type TygerClient ¶
type TygerClient struct { ControlPlaneUrl *url.URL ControlPlaneClient *Client GetAccessToken AccessTokenFunc DataPlaneClient *Client Principal string RawControlPlaneUrl *url.URL RawProxy *url.URL }
func (*TygerClient) ConnectionType ¶
func (c *TygerClient) ConnectionType() TygerConnectionType
type TygerConnectionType ¶
type TygerConnectionType int
const ( TygerConnectionTypeTcp TygerConnectionType = iota TygerConnectionTypeUnix TygerConnectionTypeSsh TygerConnectionTypeDocker )
Click to show internal directories.
Click to hide internal directories.