Documentation
¶
Index ¶
- Variables
- func NewHostMonitoringPluginFactory() driver_infrastructure.ConnectionPluginFactory
- type HostMonitorConnectionPlugin
- func (b *HostMonitorConnectionPlugin) Connect(hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string], _ bool, ...) (driver.Conn, error)
- func (b *HostMonitorConnectionPlugin) Execute(connInvokedOn driver.Conn, methodName string, ...) (wrappedReturnValue any, wrappedReturnValue2 any, wrappedOk bool, ...)
- func (b *HostMonitorConnectionPlugin) GetMonitoringHostInfo() *host_info_util.HostInfo
- func (b *HostMonitorConnectionPlugin) GetPluginCode() string
- func (b *HostMonitorConnectionPlugin) GetSubscribedMethods() []string
- func (b *HostMonitorConnectionPlugin) NotifyConnectionChanged(changes map[driver_infrastructure.HostChangeOptions]bool) driver_infrastructure.OldConnectionSuggestedAction
- type HostMonitoringPluginFactory
- type Monitor
- type MonitorConnectionState
- type MonitorImpl
- func (m *MonitorImpl) CanDispose() bool
- func (m *MonitorImpl) CheckConnectionStatus() bool
- func (m *MonitorImpl) Close()
- func (m *MonitorImpl) StartMonitoring(state *MonitorConnectionState)
- func (m *MonitorImpl) UpdateHostHealthStatus(connIsValid bool, statusCheckStartTime time.Time, statusCheckEndTime time.Time)
- type MonitorService
- type MonitorServiceImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var EFM_MONITORS *utils.SlidingExpirationCache[Monitor]
View Source
var EFM_ROUTINE_SLEEP_DURATION = 100 * time.Millisecond
Functions ¶
func NewHostMonitoringPluginFactory ¶
func NewHostMonitoringPluginFactory() driver_infrastructure.ConnectionPluginFactory
Types ¶
type HostMonitorConnectionPlugin ¶
type HostMonitorConnectionPlugin struct {
plugins.BaseConnectionPlugin
// contains filtered or unexported fields
}
func (*HostMonitorConnectionPlugin) Connect ¶
func (b *HostMonitorConnectionPlugin) Connect( hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string], _ bool, connectFunc driver_infrastructure.ConnectFunc) (driver.Conn, error)
func (*HostMonitorConnectionPlugin) Execute ¶
func (b *HostMonitorConnectionPlugin) Execute( connInvokedOn driver.Conn, methodName string, executeFunc driver_infrastructure.ExecuteFunc, methodArgs ...any) (wrappedReturnValue any, wrappedReturnValue2 any, wrappedOk bool, wrappedErr error)
func (*HostMonitorConnectionPlugin) GetMonitoringHostInfo ¶
func (b *HostMonitorConnectionPlugin) GetMonitoringHostInfo() *host_info_util.HostInfo
For testing purposes only.
func (*HostMonitorConnectionPlugin) GetPluginCode ¶ added in v1.1.0
func (b *HostMonitorConnectionPlugin) GetPluginCode() string
func (*HostMonitorConnectionPlugin) GetSubscribedMethods ¶
func (b *HostMonitorConnectionPlugin) GetSubscribedMethods() []string
func (*HostMonitorConnectionPlugin) NotifyConnectionChanged ¶
func (b *HostMonitorConnectionPlugin) NotifyConnectionChanged(changes map[driver_infrastructure.HostChangeOptions]bool) driver_infrastructure.OldConnectionSuggestedAction
type HostMonitoringPluginFactory ¶
type HostMonitoringPluginFactory struct {
}
func (HostMonitoringPluginFactory) ClearCaches ¶
func (h HostMonitoringPluginFactory) ClearCaches()
func (HostMonitoringPluginFactory) GetInstance ¶
func (h HostMonitoringPluginFactory) GetInstance(pluginService driver_infrastructure.PluginService, properties *utils.RWMap[string, string]) (driver_infrastructure.ConnectionPlugin, error)
type Monitor ¶
type Monitor interface {
StartMonitoring(state *MonitorConnectionState)
CanDispose() bool
Close()
}
type MonitorConnectionState ¶
type MonitorConnectionState struct {
// contains filtered or unexported fields
}
func NewMonitorConnectionState ¶
func NewMonitorConnectionState(connToAbort *driver.Conn) *MonitorConnectionState
func (*MonitorConnectionState) GetConn ¶
func (m *MonitorConnectionState) GetConn() *driver.Conn
func (*MonitorConnectionState) IsActive ¶
func (m *MonitorConnectionState) IsActive() bool
func (*MonitorConnectionState) SetHostUnhealthy ¶
func (m *MonitorConnectionState) SetHostUnhealthy(hostUnhealthy bool)
func (*MonitorConnectionState) SetInactive ¶
func (m *MonitorConnectionState) SetInactive()
func (*MonitorConnectionState) ShouldAbort ¶
func (m *MonitorConnectionState) ShouldAbort() bool
type MonitorImpl ¶
type MonitorImpl struct {
MonitoringConn driver.Conn
FailureCount atomic.Int32
InvalidHostStartTime time.Time
ActiveStates *utils.RWQueue[weak.Pointer[MonitorConnectionState]]
NewStates *utils.RWMap[time.Time, []weak.Pointer[MonitorConnectionState]]
Stopped atomic.Bool
HostUnhealthy atomic.Bool
// contains filtered or unexported fields
}
func NewMonitorImpl ¶
func NewMonitorImpl( pluginService driver_infrastructure.PluginService, hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string], failureDetectionTimeMillis int, failureDetectionIntervalMillis int, failureDetectionCount int, abortedConnectionsCounter telemetry.TelemetryCounter, ) *MonitorImpl
func (*MonitorImpl) CanDispose ¶
func (m *MonitorImpl) CanDispose() bool
func (*MonitorImpl) CheckConnectionStatus ¶
func (m *MonitorImpl) CheckConnectionStatus() bool
func (*MonitorImpl) Close ¶
func (m *MonitorImpl) Close()
func (*MonitorImpl) StartMonitoring ¶
func (m *MonitorImpl) StartMonitoring(state *MonitorConnectionState)
func (*MonitorImpl) UpdateHostHealthStatus ¶
type MonitorService ¶
type MonitorService interface {
StartMonitoring(conn *driver.Conn, hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string],
failureDetectionTimeMillis int, failureDetectionIntervalMillis int, failureDetectionCount int, monitorDisposalTimeMillis int) (*MonitorConnectionState, error)
StopMonitoring(state *MonitorConnectionState, connToAbort driver.Conn)
}
type MonitorServiceImpl ¶
type MonitorServiceImpl struct {
// contains filtered or unexported fields
}
func NewMonitorServiceImpl ¶
func NewMonitorServiceImpl(pluginService driver_infrastructure.PluginService) (*MonitorServiceImpl, error)
func (*MonitorServiceImpl) StartMonitoring ¶
func (m *MonitorServiceImpl) StartMonitoring(conn *driver.Conn, hostInfo *host_info_util.HostInfo, props *utils.RWMap[string, string], failureDetectionTimeMillis int, failureDetectionIntervalMillis int, failureDetectionCount int, monitorDisposalTimeMillis int) (*MonitorConnectionState, error)
func (*MonitorServiceImpl) StopMonitoring ¶
func (m *MonitorServiceImpl) StopMonitoring(state *MonitorConnectionState, connToAbort driver.Conn)
Click to show internal directories.
Click to hide internal directories.