Documentation
¶
Index ¶
- func LogClusterDriverFailure(name string, err error)
- func RegisterClusterDriver(driver ClusterDriver)
- func RegisterPersistentClusterDriver(driverFunc func() ClusterDriver)
- func ResetClusterDrivers()
- type AlertingManager
- func (a *AlertingManager) ConfigureCluster(ctx context.Context, conf *alertops.ClusterConfiguration) (*emptypb.Empty, error)
- func (a *AlertingManager) GetClusterConfiguration(ctx context.Context, _ *emptypb.Empty) (*alertops.ClusterConfiguration, error)
- func (a *AlertingManager) GetClusterStatus(ctx context.Context, _ *emptypb.Empty) (*alertops.InstallStatus, error)
- func (a *AlertingManager) GetRuntimeOptions() shared.AlertingClusterOptions
- func (a *AlertingManager) InstallCluster(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)
- func (a *AlertingManager) Name() string
- func (a *AlertingManager) ShouldDisableNode(_ *corev1.Reference) error
- func (a *AlertingManager) UninstallCluster(ctx context.Context, _ *alertops.UninstallRequest) (*emptypb.Empty, error)
- type AlertingManagerDriverOption
- func WithAlertingRuntimeOptions(opts *shared.AlertingClusterOptions) AlertingManagerDriverOption
- func WithGatewayRef(ref types.NamespacedName) AlertingManagerDriverOption
- func WithK8sClient(client client.Client) AlertingManagerDriverOption
- func WithLogger(logger *zap.SugaredLogger) AlertingManagerDriverOption
- func WithSubscribers(subscribers []chan shared.AlertingClusterNotification) AlertingManagerDriverOption
- type AlertingManagerDriverOptions
- type ClusterDriver
- type NoopClusterDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogClusterDriverFailure ¶
func RegisterClusterDriver ¶
func RegisterClusterDriver(driver ClusterDriver)
func RegisterPersistentClusterDriver ¶
func RegisterPersistentClusterDriver(driverFunc func() ClusterDriver)
func ResetClusterDrivers ¶
func ResetClusterDrivers()
Types ¶
type AlertingManager ¶
type AlertingManager struct { AlertingManagerDriverOptions alertops.UnsafeAlertingAdminServer // contains filtered or unexported fields }
func NewAlertingManagerDriver ¶
func NewAlertingManagerDriver(opts ...AlertingManagerDriverOption) (*AlertingManager, error)
func (*AlertingManager) ConfigureCluster ¶
func (a *AlertingManager) ConfigureCluster(ctx context.Context, conf *alertops.ClusterConfiguration) (*emptypb.Empty, error)
func (*AlertingManager) GetClusterConfiguration ¶
func (a *AlertingManager) GetClusterConfiguration(ctx context.Context, _ *emptypb.Empty) (*alertops.ClusterConfiguration, error)
func (*AlertingManager) GetClusterStatus ¶
func (a *AlertingManager) GetClusterStatus(ctx context.Context, _ *emptypb.Empty) (*alertops.InstallStatus, error)
func (*AlertingManager) GetRuntimeOptions ¶
func (a *AlertingManager) GetRuntimeOptions() shared.AlertingClusterOptions
func (*AlertingManager) InstallCluster ¶
func (*AlertingManager) Name ¶
func (a *AlertingManager) Name() string
func (*AlertingManager) ShouldDisableNode ¶
func (a *AlertingManager) ShouldDisableNode(_ *corev1.Reference) error
func (*AlertingManager) UninstallCluster ¶
func (a *AlertingManager) UninstallCluster(ctx context.Context, _ *alertops.UninstallRequest) (*emptypb.Empty, error)
type AlertingManagerDriverOption ¶
type AlertingManagerDriverOption func(*AlertingManagerDriverOptions)
func WithAlertingRuntimeOptions ¶ added in v0.8.2
func WithAlertingRuntimeOptions(opts *shared.AlertingClusterOptions) AlertingManagerDriverOption
func WithGatewayRef ¶
func WithGatewayRef(ref types.NamespacedName) AlertingManagerDriverOption
func WithK8sClient ¶
func WithK8sClient(client client.Client) AlertingManagerDriverOption
func WithLogger ¶
func WithLogger(logger *zap.SugaredLogger) AlertingManagerDriverOption
func WithSubscribers ¶ added in v0.8.2
func WithSubscribers(subscribers []chan shared.AlertingClusterNotification) AlertingManagerDriverOption
type AlertingManagerDriverOptions ¶
type AlertingManagerDriverOptions struct { Logger *zap.SugaredLogger AlertingOptions *shared.AlertingClusterOptions Subscribers []chan shared.AlertingClusterNotification // contains filtered or unexported fields }
func (*AlertingManagerDriverOptions) Apply ¶ added in v0.8.2
func (a *AlertingManagerDriverOptions) Apply(opts ...AlertingManagerDriverOption)
type ClusterDriver ¶
type ClusterDriver interface { alertops.AlertingAdminServer // Unique name of the driver Name() string // ShouldDisableNode is called during node sync for nodes which otherwise // have this capability enabled. If this function returns an error, the // node will be set to disabled instead, and the error will be logged. ShouldDisableNode(*corev1.Reference) error GetRuntimeOptions() shared.AlertingClusterOptions }
func GetClusterDriver ¶
func GetClusterDriver(name string) (ClusterDriver, error)
type NoopClusterDriver ¶
type NoopClusterDriver struct {
alertops.UnimplementedAlertingAdminServer
}
func (*NoopClusterDriver) GetRuntimeOptions ¶
func (d *NoopClusterDriver) GetRuntimeOptions() shared.AlertingClusterOptions
func (*NoopClusterDriver) Name ¶
func (d *NoopClusterDriver) Name() string
func (*NoopClusterDriver) ShouldDisableNode ¶
func (d *NoopClusterDriver) ShouldDisableNode(*corev1.Reference) error
Click to show internal directories.
Click to hide internal directories.