installer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context, eventBus *v1alpha1.EventBus, client client.Client, natsStreamingImage, natsMetricsImage string, logger *zap.SugaredLogger) error

Install function installs the event bus

func Uninstall

func Uninstall(ctx context.Context, eventBus *v1alpha1.EventBus, client client.Client, natsStreamingImage, natsMetricsImage string, logger *zap.SugaredLogger) error

Uninstall function will be run before the EventBus object is deleted, usually it could be used to uninstall the extra resources who would not be cleaned up when an EventBus is deleted. Most of the time this is not needed as all the dependency resources should have been deleted by owner references cascade deletion, but things like PVC created by StatefulSet need to be cleaned up separately.

It could also be used to check if the EventBus object can be safely deleted.

Types

type Installer

type Installer interface {
	Install(ctx context.Context) (*v1alpha1.BusConfig, error)
	// Uninsall only needs to handle those resources not cascade deleted.
	// For example, undeleted PVCs not automatically deleted when deleting a StatefulSet
	Uninstall(ctx context.Context) error
}

Installer is an interface for event bus installation

func NewExoticNATSInstaller

func NewExoticNATSInstaller(eventBus *v1alpha1.EventBus, logger *zap.SugaredLogger) Installer

NewExoticNATSInstaller return a new exoticNATSInstaller

func NewNATSInstaller

func NewNATSInstaller(client client.Client, eventBus *v1alpha1.EventBus, streamingImage, metricsImage string, labels map[string]string, logger *zap.SugaredLogger) Installer

NewNATSInstaller returns a new NATS installer

Jump to

Keyboard shortcuts

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