loader

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManagedFieldManagerInput = "inputfileloader"
)

Variables

This section is empty.

Functions

func GetCommitFileReader added in v0.0.9

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

func GetFSReader

func GetFSReader(path string) pkgio.Reader[[]byte]

func GetFSReconcilerReader added in v0.0.15

func GetFSReconcilerReader(path string) pkgio.Reader[[]byte]

func GetFSStarReader added in v0.0.15

func GetFSStarReader(path string) pkgio.Reader[[]byte]

func GetFSYAMLReader

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

func GetRunningConfigReader added in v0.0.15

func GetRunningConfigReader(path string) pkgio.Reader[[]byte]

Types

type DataLoader

type DataLoader struct {
	Cfg        *genericclioptions.ChoreoConfig
	Client     resourceclient.Client
	Branch     string
	GVKs       []schema.GroupVersionKind
	RepoPth    string
	PathInRepo string
	// used to clean reasources
	//APIStore       *api.APIStore
	InternalAPISet sets.Set[schema.GroupVersionKind]
	Annotation     string
}

func (*DataLoader) Load

func (r *DataLoader) Load(ctx context.Context) error

type DataLoaderUpstream

type DataLoaderUpstream struct {
	Cfg        *genericclioptions.ChoreoConfig
	PathInRepo string
	//UpstreamClient          resourceclient.Client // used to read data from commit from upstream repo
	Client                  resourceclient.Client
	Branch                  string
	ChildGVKSet             sets.Set[schema.GroupVersionKind]
	UpstreamAnnotationValue string
	NewUpstreamData         sets.Set[corev1.ObjectReference]
}

func (*DataLoaderUpstream) Load

func (r *DataLoaderUpstream) Load(ctx context.Context, commit *object.Commit) error

type DevLoader added in v0.0.9

type DevLoader struct {
	Cfg         *genericclioptions.ChoreoConfig
	RepoPath    string
	PathInRepo  string
	Libraries   []*choreov1alpha1.Library
	Reconcilers []*choreov1alpha1.Reconciler
}

func (*DevLoader) LoadLibraries added in v0.0.15

func (r *DevLoader) LoadLibraries(ctx context.Context) error

func (*DevLoader) LoadReconcilers added in v0.0.15

func (r *DevLoader) LoadReconcilers(ctx context.Context) error

type InputLoader

type InputLoader struct {
	Client   resourceclient.Client
	Branch   string
	NewInput sets.Set[corev1.ObjectReference]
	//APIStore       *api.APIStore
	GVKs           []schema.GroupVersionKind
	InternalAPISet sets.Set[schema.GroupVersionKind]
	Annotation     string
}

func (*InputLoader) Clean

func (r *InputLoader) Clean(ctx context.Context) error

func (*InputLoader) Load

func (r *InputLoader) Load(ctx context.Context, reader pkgio.Reader[*yaml.RNode]) error

type RunningConfigLoader added in v0.0.15

type RunningConfigLoader struct {
	Cfg *genericclioptions.ChoreoConfig
	//Client     resourceclient.Client
	//Branch     string
	RepoPath       string
	PathInRepo     string
	RunningConfigs map[string]any
}

UpstreamLoader

func (*RunningConfigLoader) Load added in v0.0.15

type SchemaLoader added in v0.0.15

type SchemaLoader struct {
	Parent instance.ChoreoInstance
	Cfg    *genericclioptions.ChoreoConfig
	//Client     resourceclient.Client
	//Branch     string
	RepoPath   string
	PathInRepo string
	TempDir    string
}

UpstreamLoader

func (*SchemaLoader) Load added in v0.0.15

func (r *SchemaLoader) Load(ctx context.Context) error

type UpstreamCallBackFn

type UpstreamCallBackFn func(ctx context.Context, parentName string, repo repository.Repository, upstreamRef *choreov1alpha1.UpstreamRef, cfg *genericclioptions.ChoreoConfig, commit *object.Commit, annotationVal string) error

type UpstreamLoader

type UpstreamLoader struct {
	Parent     instance.ChoreoInstance
	Cfg        *genericclioptions.ChoreoConfig
	Client     resourceclient.Client
	Branch     string
	RepoPath   string
	PathInRepo string
	TempDir    string
	ProgressFn func(string)
}

UpstreamLoader

func (*UpstreamLoader) Load

func (r *UpstreamLoader) Load(ctx context.Context) error

Jump to

Keyboard shortcuts

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