Documentation
¶
Index ¶
- Constants
- Variables
- func CloneRetryableClient(c *retryablehttp.Client) *retryablehttp.Client
- func GetCaCertPemBytes(source TlsCaCertificateSource) ([]byte, error)
- func GetDefaultSocketUrl() string
- 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 HttpTransportExposer
- type HttpTransportOption
- type MakeDialer
- type MakeRoundTripper
- type SshParams
- type TlsCaCertificateSource
- type TygerClient
- type TygerConnectionType
Constants ¶
View Source
const (
DefaultControlPlaneSocketPathEnvVar = "TYGER_SOCKET_PATH"
)
View Source
const UnixTransportHostPrefix = "unix----"
Variables ¶
View Source
var ( DefaultClient *Client DefaultRetryableClient *retryablehttp.Client //go:embed ca-certificates.pem CaCertificates []byte )
Functions ¶
func CloneRetryableClient ¶
func CloneRetryableClient(c *retryablehttp.Client) *retryablehttp.Client
func GetCaCertPemBytes ¶
func GetCaCertPemBytes(source TlsCaCertificateSource) ([]byte, error)
func GetDefaultSocketUrl ¶
func GetDefaultSocketUrl() string
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
}
func NewClient ¶
func NewClient(opts *ClientOptions) (*Client, error)
func NewControlPlaneClient ¶
func NewControlPlaneClient(opts *ClientOptions) (*Client, error)
func NewDataPlaneClient ¶
func NewDataPlaneClient(opts *ClientOptions) (*Client, error)
func (*Client) GetUnderlyingTransport ¶
type ClientOptions ¶
type ClientOptions struct {
ProxyString string
CreateTransport MakeRoundTripper
CreateDialer MakeDialer
DisableRetries bool
CaCertificateSource TlsCaCertificateSource
}
type CommandTransport ¶
type CommandTransport struct {
// contains filtered or unexported fields
}
func (*CommandTransport) GetUnderlyingTransport ¶
func (c *CommandTransport) GetUnderlyingTransport() *http.Transport
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 HttpTransportExposer ¶
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 TlsCaCertificateSource ¶
type TlsCaCertificateSource string
const ( TlsCaCertificateSourceOperatingSystem TlsCaCertificateSource = "os" TlsCaCertificateSourceEmbedded TlsCaCertificateSource = "embedded" )
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
func (*TygerClient) GetRoleAssignments ¶
func (c *TygerClient) GetRoleAssignments(ctx context.Context) ([]string, error)
type TygerConnectionType ¶
type TygerConnectionType int
const ( TygerConnectionTypeTcp TygerConnectionType = iota TygerConnectionTypeUnix TygerConnectionTypeSsh TygerConnectionTypeDocker )
Click to show internal directories.
Click to hide internal directories.