Documentation ¶
Index ¶
- type ApplicationInstallerLogger
- func (a ApplicationInstallerLogger) Apply(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a ApplicationInstallerLogger) Delete(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a ApplicationInstallerLogger) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, ...) (string, error)
- func (a ApplicationInstallerLogger) GetAppCache() string
- type ApplicationInstallerRecorder
- func (a *ApplicationInstallerRecorder) Apply(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a *ApplicationInstallerRecorder) Delete(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (a *ApplicationInstallerRecorder) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, ...) (string, error)
- func (a *ApplicationInstallerRecorder) GetAppCache() string
- type CustomApplicationInstaller
- func (c CustomApplicationInstaller) Apply(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (c CustomApplicationInstaller) Delete(ctx context.Context, log *zap.SugaredLogger, ...) (util.StatusUpdater, error)
- func (c CustomApplicationInstaller) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, ...) (string, error)
- func (c CustomApplicationInstaller) GetAppCache() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationInstallerLogger ¶
type ApplicationInstallerLogger struct { }
ApplicationInstallerLogger is a fake ApplicationInstaller that just logs actions. it's used for the development of the controller.
func (ApplicationInstallerLogger) Apply ¶
func (a ApplicationInstallerLogger) Apply(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error)
func (ApplicationInstallerLogger) Delete ¶
func (a ApplicationInstallerLogger) Delete(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)
func (ApplicationInstallerLogger) DonwloadSource ¶
func (a ApplicationInstallerLogger) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error)
func (ApplicationInstallerLogger) GetAppCache ¶
func (a ApplicationInstallerLogger) GetAppCache() string
type ApplicationInstallerRecorder ¶
type ApplicationInstallerRecorder struct { // DownloadEvents stores the call to download function. Key is the name of the applicationInstallation. DownloadEvents sync.Map // ApplyEvents stores the call to apply function. Key is the name of the applicationInstallation. ApplyEvents sync.Map // DeleteEvents stores the call to delete function. Key is the name of the applicationInstallation. DeleteEvents sync.Map }
ApplicationInstallerRecorder is a fake ApplicationInstaller that records calls to apply and delete for testing assertions.
func (*ApplicationInstallerRecorder) Apply ¶
func (a *ApplicationInstallerRecorder) Apply(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error)
func (*ApplicationInstallerRecorder) Delete ¶
func (a *ApplicationInstallerRecorder) Delete(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)
func (*ApplicationInstallerRecorder) DonwloadSource ¶
func (a *ApplicationInstallerRecorder) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error)
func (*ApplicationInstallerRecorder) GetAppCache ¶
func (a *ApplicationInstallerRecorder) GetAppCache() string
type CustomApplicationInstaller ¶
type CustomApplicationInstaller struct { GetAppCacheFunc func() string DonwloadSourceFunc func(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error) ApplyFunc func(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error) DeleteFunc func(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error) }
CustomApplicationInstaller is an applicationInstaller in which every function can be independently mocked. If a function is not mocked, then default values are returned.
func (CustomApplicationInstaller) Apply ¶
func (c CustomApplicationInstaller) Apply(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, appDefinition *appskubermaticv1.ApplicationDefinition, applicationInstallation *appskubermaticv1.ApplicationInstallation, appSourcePath string) (util.StatusUpdater, error)
func (CustomApplicationInstaller) Delete ¶
func (c CustomApplicationInstaller) Delete(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, userClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation) (util.StatusUpdater, error)
func (CustomApplicationInstaller) DonwloadSource ¶
func (c CustomApplicationInstaller) DonwloadSource(ctx context.Context, log *zap.SugaredLogger, seedClient ctrlruntimeclient.Client, applicationInstallation *appskubermaticv1.ApplicationInstallation, downloadDest string) (string, error)
func (CustomApplicationInstaller) GetAppCache ¶
func (c CustomApplicationInstaller) GetAppCache() string
Click to show internal directories.
Click to hide internal directories.