Documentation
¶
Index ¶
Constants ¶
const ( // MinimumFailureCountForFailover - threshold beyond which failover can be done to the backup server MinimumFailureCountForFailover = 10 // MaximumFailureDurationForFailover - max duration after which failover is attempted MaximumFailureDurationForFailover = 1 * time.Minute // MinimumSuccessCount - minimum number of successes to reset the proxy health MinimumSuccessCount = 5 )
const ( DefaultCertFile = "tls.crt" DefaultKeyFile = "tls.key" DefaultTLSCertDirName = "tls" DefaultCertDirName = "certs" DefaultConfigFileName = "config" DefaultConfigDir = "deploy" TestConfigDir = "test-config" TempConfigDir = "test-config/tmp" TestConfigFileName = "config.yaml" EnvCertDirName = "X_CSI_REVPROXY_CERT_DIR" EnvTLSCertDirName = "X_CSI_REVPROXY_TLS_CERT_DIR" EnvWatchNameSpace = "X_CSI_REVPROXY_WATCH_NAMESPACE" EnvConfigFileName = "X_CSI_REVPROXY_CONFIG_FILE_NAME" EnvConfigDirName = "X_CSI_REVPROXY_CONFIG_DIR" EnvInClusterConfig = "X_CSI_REVRPOXY_IN_CLUSTER" EnvIsLeaderElectionEnabled = "X_CSI_REVPROXY_IS_LEADER_ENABLED" DefaultNameSpace = "powermax" MaxActiveReadRequests = 5 MaxOutStandingWriteRequests = 50 MaxActiveWriteRequests = 4 MaxOutStandingReadRequests = 50 )
Constants for the proxy
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
Credentials represent a pair of username and password
type Envoy ¶
type Envoy interface { SetPrimary(*Proxy) Envoy SetBackup(*Proxy) Envoy GetPrimary() *Proxy GetBackup() *Proxy GetActiveProxy() *Proxy SetPrimaryHTTPClient(*http.Client) Envoy SetBackupHTTPClient(*http.Client) Envoy GetPrimaryHTTPClient() *http.Client GetBackupHTTPClient() *http.Client GetActiveHTTPClient() *http.Client RemoveBackupProxy() RemoveBackupHTTPClient() ConfigureHealthParams(int, int, time.Duration) HasHealthDeteriorated() bool }
Envoy is an interface for failover/failback enabled proxy clients
type Limits ¶
type Limits struct { MaxActiveRead int `yaml:"maxActiveRead,omitempty"` MaxActiveWrite int `yaml:"maxActiveWrite,omitempty"` MaxOutStandingRead int `yaml:"maxOutStandingRead,omitempty"` MaxOutStandingWrite int `yaml:"maxOutStandingWrite,omitempty"` }
Limits is used for storing the various types of limits applied for a particular proxy instance
type LockType ¶
type LockType string
LockType represents the type of locks being taken against Unisphere currently the supported values are Read and Write
type Proxy ¶
type Proxy struct { ReverseProxy *httputil.ReverseProxy URL url.URL Limits Limits }
Proxy - interface which is implemented by different types of Proxies
type ProxyHealth ¶
type ProxyHealth interface { ReportFailure() bool ReportSuccess() SetThreshold(int, int, time.Duration) HasDeteriorated() bool }
ProxyHealth - interface which is implemented by the different proxies for tracking their health
func NewProxyHealth ¶
func NewProxyHealth() ProxyHealth
NewProxyHealth - creates and returns a new proxyHealth instance
type SymmURL ¶
SymmURL - represents a combination of a symmetrix id and the corresponding management URL
type Transport ¶
type Transport struct { http.RoundTripper HealthHandler func(bool) }
Transport - represents the custom http transport implementation