drivers

package
v0.6.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 25 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 ClusterDriver

type ClusterDriver interface {
	Name() string
	CreateCredentials(context.Context, *corev1.Reference) error
	GetCredentials(context.Context, string) (username string, password string)
	GetExternalURL(context.Context) string
	GetInstallStatus(context.Context) InstallState
	SetClusterStatus(context.Context, string, bool) error
	GetClusterStatus(context.Context, string) (*capabilityv1.NodeCapabilityStatus, error)
}

func GetClusterDriver

func GetClusterDriver(name string) (ClusterDriver, error)

type InstallState

type InstallState int
const (
	Pending InstallState = iota
	Installed
	Absent
	Error
)

type KubernetesManagerDriver

type KubernetesManagerDriver struct {
	KubernetesManagerDriverOptions
}

func (*KubernetesManagerDriver) CreateCredentials

func (d *KubernetesManagerDriver) CreateCredentials(ctx context.Context, req *opnicorev1.Reference) error

func (*KubernetesManagerDriver) GetClusterStatus

func (*KubernetesManagerDriver) GetCredentials

func (d *KubernetesManagerDriver) GetCredentials(ctx context.Context, id string) (username string, password string)

func (*KubernetesManagerDriver) GetExternalURL

func (d *KubernetesManagerDriver) GetExternalURL(ctx context.Context) string

func (*KubernetesManagerDriver) GetInstallStatus

func (d *KubernetesManagerDriver) GetInstallStatus(ctx context.Context) InstallState

func (*KubernetesManagerDriver) Name

func (d *KubernetesManagerDriver) Name() string

func (*KubernetesManagerDriver) SetClusterStatus

func (d *KubernetesManagerDriver) SetClusterStatus(ctx context.Context, id string, enabled bool) error

type KubernetesManagerDriverOption

type KubernetesManagerDriverOption func(*KubernetesManagerDriverOptions)

func WithK8sClient

func WithK8sClient(k8sClient client.Client) KubernetesManagerDriverOption

func WithNamespace

func WithNamespace(namespace string) KubernetesManagerDriverOption

func WithOpensearchCluster

func WithOpensearchCluster(opensearchCluster *opnimeta.OpensearchClusterRef) KubernetesManagerDriverOption

type KubernetesManagerDriverOptions

type KubernetesManagerDriverOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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