drivers

package
v0.8.3-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogClusterDriverFailure

func LogClusterDriverFailure(name string, err error)

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 (a *AlertingManager) InstallCluster(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empty, error)

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 WithK8sClient

func WithK8sClient(client client.Client) 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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL