Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DdsClientConfig ¶
type DdsClientConfig struct {
config.BaseConfig
// Interval for refreshing state of the world
RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_REFRESH_INTERVAL"`
// If true, TLS connection to the server won't be verified.
TlsSkipVerify bool `json:"tlsSkipVerify" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_TLS_SKIP_VERIFY"`
// RootCAFile defines a path to a file with PEM-encoded Root CA. Client will verify the server by using it.
RootCAFile string `json:"rootCaFile" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_ROOT_CA_FILE"`
// MaxMsgSize defines a maximum size of the message that is exchanged using DDS.
// In practice this means a limit on full list of one resource type.
MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_MAX_MSG_SIZE"`
// MsgSendTimeout defines a timeout on sending a single DDS message.
// DDS stream between control planes is terminated if the control plane hits this timeout.
MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_MSG_SEND_TIMEOUT"`
// Backoff that is executed when the zone control plane is sending the response that was previously rejected by global control plane.
NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_NACK_BACKOFF"`
// ResponseBackoff is a time Zone CP waits before sending ACK/NACK.
// This is a way to slow down Global CP from sending resources too often.
ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"DUBBO_MULTIZONE_ZONE_DDS_RESPONSE_BACKOFF"`
}
type DdsServerConfig ¶
type DdsServerConfig struct {
config.BaseConfig
// Port of a gRPC server that serves Dubbo Discovery Service (DDS).
GrpcPort uint32 `json:"grpcPort" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_GRPC_PORT"`
// Interval for refreshing state of the world
RefreshInterval config_types.Duration `json:"refreshInterval" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_REFRESH_INTERVAL"`
// Interval for flushing Zone Insights (stats of multi-zone communication)
ZoneInsightFlushInterval config_types.Duration `json:"zoneInsightFlushInterval" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_ZONE_INSIGHT_FLUSH_INTERVAL"`
// TlsEnabled turns on TLS for DDS
TlsEnabled bool `json:"tlsEnabled" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_ENABLED"`
// TlsCertFile defines a path to a file with PEM-encoded TLS cert.
TlsCertFile string `json:"tlsCertFile" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_CERT_FILE"`
// TlsKeyFile defines a path to a file with PEM-encoded TLS key.
TlsKeyFile string `json:"tlsKeyFile" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_KEY_FILE"`
// TlsMinVersion defines the minimum TLS version to be used
TlsMinVersion string `json:"tlsMinVersion" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_MIN_VERSION"`
// TlsMaxVersion defines the maximum TLS version to be used
TlsMaxVersion string `json:"tlsMaxVersion" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_MAX_VERSION"`
// TlsCipherSuites defines the list of ciphers to use
TlsCipherSuites []string `json:"tlsCipherSuites" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_TLS_CIPHER_SUITES"`
// MaxMsgSize defines a maximum size of the message that is exchanged using DDS.
// In practice this means a limit on full list of one resource type.
MaxMsgSize uint32 `json:"maxMsgSize" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_MAX_MSG_SIZE"`
// MsgSendTimeout defines a timeout on sending a single DDS message.
// DDS stream between control planes is terminated if the control plane hits this timeout.
MsgSendTimeout config_types.Duration `json:"msgSendTimeout" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_MSG_SEND_TIMEOUT"`
// Backoff that is executed when the global control plane is sending the response that was previously rejected by zone control plane.
NackBackoff config_types.Duration `json:"nackBackoff" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_NACK_BACKOFF"`
// DisableSOTW if true doesn't expose SOTW version of DDS. Default: false
DisableSOTW bool `json:"disableSOTW" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_DISABLE_SOTW"`
// ResponseBackoff is a time Global CP waits before sending ACK/NACK.
// This is a way to slow down Zone CP from sending resources too often.
ResponseBackoff config_types.Duration `json:"responseBackoff" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_RESPONSE_BACKOFF"`
// ZoneHealthCheck holds config for ensuring zones are online
ZoneHealthCheck ZoneHealthCheckConfig `json:"zoneHealthCheck"`
}
func (*DdsServerConfig) PostProcess ¶
func (c *DdsServerConfig) PostProcess() error
func (*DdsServerConfig) Validate ¶
func (c *DdsServerConfig) Validate() error
type GlobalConfig ¶
type GlobalConfig struct {
// DDS Configuration
DDS *DdsServerConfig `json:"dds,omitempty"`
}
GlobalConfig defines Global configuration
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() *GlobalConfig
func (*GlobalConfig) PostProcess ¶
func (g *GlobalConfig) PostProcess() error
func (*GlobalConfig) Sanitize ¶
func (g *GlobalConfig) Sanitize()
func (*GlobalConfig) Validate ¶
func (g *GlobalConfig) Validate() error
type MultizoneConfig ¶
type MultizoneConfig struct {
Global *GlobalConfig `json:"global,omitempty"`
Zone *ZoneConfig `json:"zone,omitempty"`
}
MultizoneConfig defines multizone configuration
func DefaultMultizoneConfig ¶
func DefaultMultizoneConfig() *MultizoneConfig
func (*MultizoneConfig) PostProcess ¶
func (m *MultizoneConfig) PostProcess() error
func (*MultizoneConfig) Sanitize ¶
func (m *MultizoneConfig) Sanitize()
func (*MultizoneConfig) Validate ¶
func (m *MultizoneConfig) Validate() error
type ZoneConfig ¶
type ZoneConfig struct {
// Dubbo Zone name used to mark the zone dataplane resources
Name string `json:"name,omitempty" envconfig:"DUBBO_MULTIZONE_ZONE_NAME"`
// GlobalAddress URL of Global Dubbo CP
GlobalAddress string `json:"globalAddress,omitempty" envconfig:"DUBBO_MULTIZONE_ZONE_GLOBAL_ADDRESS"`
// DDS Configuration
DDS *DdsClientConfig `json:"dds,omitempty"`
// DisableOriginLabelValidation disables validation of the origin label when applying resources on Zone CP
DisableOriginLabelValidation bool `json:"disableOriginLabelValidation,omitempty" envconfig:"DUBBO_MULTIZONE_ZONE_DISABLE_ORIGIN_LABEL_VALIDATION"`
}
ZoneConfig defines zone configuration
func DefaultZoneConfig ¶
func DefaultZoneConfig() *ZoneConfig
func (*ZoneConfig) PostProcess ¶
func (r *ZoneConfig) PostProcess() error
func (*ZoneConfig) Sanitize ¶
func (r *ZoneConfig) Sanitize()
func (*ZoneConfig) Validate ¶
func (r *ZoneConfig) Validate() error
type ZoneHealthCheckConfig ¶
type ZoneHealthCheckConfig struct {
config.BaseConfig
// PollInterval is the interval between the global CP checking ZoneInsight for
// health check pings and interval between zone CP sending health check pings
PollInterval config_types.Duration `json:"pollInterval" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_ZONE_HEALTH_CHECK_POLL_INTERVAL"`
// Timeout is the time after the last health check that a zone counts as
// no longer online
Timeout config_types.Duration `json:"timeout" envconfig:"DUBBO_MULTIZONE_GLOBAL_DDS_ZONE_HEALTH_CHECK_TIMEOUT"`
}
func (ZoneHealthCheckConfig) Validate ¶
func (c ZoneHealthCheckConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.