crdloader

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmbeddedAPIFS embed.FS

Embed specific files

Functions

func AddStorage

func AddStorage(backends map[string]*BackendConfig, apiStore *api.APIStore) error

func GetAPIExtReader

func GetAPIExtReader() pkgio.Reader[*yaml.RNode]

func GetBackendConfig

func GetBackendConfig() map[string]*BackendConfig

func GetCommitFileAPICRDReader added in v0.0.9

func GetCommitFileAPICRDReader(crdPath string, commit *object.Commit) pkgio.Reader[*yaml.RNode]

func GetEmbeddedAPIReader

func GetEmbeddedAPIReader() pkgio.Reader[*yaml.RNode]

func GetFSYAMLReader

func GetFSYAMLReader(path string, matchgvks []schema.GroupVersionKind) pkgio.Reader[*yaml.RNode]

func GetFileAPICRDReader

func GetFileAPICRDReader(abspath string) pkgio.Reader[*yaml.RNode]

func GetInternalAPIReader

func GetInternalAPIReader() pkgio.Reader[*yaml.RNode]

func LoadCRD

func LoadCRD(ctx context.Context, pathInRepo, dbpath string, crd *apiextensionsv1.CustomResourceDefinition, internalAPIs map[string]*BackendConfig, choreoAPI bool) (*api.ResourceContext, error)

loadCRD loads the storage version of the CRD. if no storage version is supplied this call will fail

func NewChoreoGenericBackendstorage added in v0.0.14

func NewChoreoGenericBackendstorage(
	indexKind string,
	entryStorage, claimStorage rest.Storage,
	entryObjectFn func(runtime.Unstructured) (backend.EntryObject, error),
	claimObjectFn func(runtime.Unstructured) (backend.ClaimObject, error),
) genericbe.BackendStorage

func NewChoreoIPAMBackendstorage added in v0.0.14

func NewChoreoIPAMBackendstorage(
	indexKind string,
	entryStorage, claimStorage rest.Storage,
) ipambe.BackendStorage

Types

type BackendConfig

type BackendConfig struct {
	Backend        bebackend.Backend
	IndexKind      string
	EntryKind      string
	ClaimKind      string
	EntryObjectFn  func(runtime.Unstructured) (backend.EntryObject, error)
	ClaimObjectFn  func(runtime.Unstructured) (backend.ClaimObject, error)
	IndexInvokerFn func(be bebackend.Backend) options.BackendInvoker
	ClaimInvokerFn func(be bebackend.Backend) options.BackendInvoker
	// derived
	IndexInvoker options.BackendInvoker
	ClaimInvoker options.BackendInvoker
}

Jump to

Keyboard shortcuts

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