utils

package
v0.0.0-...-fc29aca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: UPL-1.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dst string, filter FileFilter) error

func CopyFile

func CopyFile(src, dst string) error

CopyFile copies a single file from src to dst

func StringArrayContains

func StringArrayContains(list []string, s string) bool

func StringArrayDoesNotContain

func StringArrayDoesNotContain(list []string, s string) bool

Types

type FileFilter

type FileFilter func(string) bool

func AlwaysFilter

func AlwaysFilter() FileFilter

type Storage

type Storage interface {
	// GetName returns the name of the storage secret.
	GetName() string
	// GetLatest obtains the deployment resources for the specified version
	GetLatest() coh.Resources
	// GetPrevious obtains the deployment resources for the version prior to the specified version
	GetPrevious() coh.Resources
	// Store will store the deployment resources, this will create a new version in the store
	Store(coh.Resources, coh.CoherenceResource) error
	// Destroy will destroy the store
	Destroy()
	// GetHash will return the hash label of the owning resource
	GetHash() (string, bool)
	// IsJob returns true if the Coherence deployment is a Job
	IsJob(reconcile.Request) bool
}

func NewStorage

func NewStorage(key client.ObjectKey, mgr manager.Manager) (Storage, error)

NewStorage creates a new storage for the given key.

Jump to

Keyboard shortcuts

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