Documentation ¶
Index ¶
- type GitPersister
- func (p *GitPersister) Delete(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, ...) error
- func (p *GitPersister) Exists(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, ...) (bool, error)
- func (p *GitPersister) Get(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error)
- func (p *GitPersister) InjectLogger(il *logging.Logger)
- func (p *GitPersister) InternalPersister() persist.Persister
- func (p *GitPersister) Persist(ctx context.Context, resource *unstructured.Unstructured, ...) (*unstructured.Unstructured, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitPersister ¶
GitPersister persists data by pushing changes to a git repository.
func New ¶
func New(ctx context.Context, stDef *config.StorageDefinition) (*GitPersister, error)
New creates a new GitPersister. If expectChangesFromRemote is false, the Persister assumes that it is the only one pushing to the repository and pulls only in case of an error during push. If it is true, every action causes it to pull first.
func (*GitPersister) Delete ¶
func (p *GitPersister) Delete(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, subPath string) error
func (*GitPersister) Exists ¶
func (p *GitPersister) Exists(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, subPath string) (bool, error)
func (*GitPersister) Get ¶
func (p *GitPersister) Get(ctx context.Context, name, namespace string, gvk schema.GroupVersionKind, subPath string) (*unstructured.Unstructured, error)
func (*GitPersister) InjectLogger ¶
func (p *GitPersister) InjectLogger(il *logging.Logger)
func (*GitPersister) InternalPersister ¶
func (p *GitPersister) InternalPersister() persist.Persister
func (*GitPersister) Persist ¶
func (p *GitPersister) Persist(ctx context.Context, resource *unstructured.Unstructured, t persist.Transformer, subPath string) (*unstructured.Unstructured, bool, error)
Click to show internal directories.
Click to hide internal directories.