repository

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: Apache-2.0 Imports: 26 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start added in v0.1.4

func Start(ctx context.Context, instance *v1alpha1.Repository, duration time.Duration, repoName string, c client.Client, logger logr.Logger) (repo.Entry, error)

Start the Watcher

Types

type Action added in v0.1.4

type Action interface {
	Create(component *v1alpha1.Component) error
	Update(component *v1alpha1.Component) error
	Delete(component *v1alpha1.Component) error
}

Action defines the actiosn required to control the components

type CommonAction added in v0.1.4

type CommonAction struct {
	// contains filtered or unexported fields
}

CommonAction shared by the watchers

func (*CommonAction) Create added in v0.1.4

func (c *CommonAction) Create(component *v1alpha1.Component) error

Create the component and update it in the k8s client

func (*CommonAction) Delete added in v0.1.4

func (c *CommonAction) Delete(component *v1alpha1.Component) error

Delete the component in the k8s client

func (*CommonAction) Update added in v0.1.4

func (c *CommonAction) Update(component *v1alpha1.Component) error

Update the component in the k8s client

type HTTPWatcher added in v0.1.4

type HTTPWatcher struct {
	CommonAction
	// contains filtered or unexported fields
}

func (*HTTPWatcher) Poll added in v0.1.4

func (c *HTTPWatcher) Poll()

Poll the components

func (*HTTPWatcher) Start added in v0.1.4

func (c *HTTPWatcher) Start() error

func (*HTTPWatcher) Stop added in v0.1.4

func (c *HTTPWatcher) Stop()

type IWatcher

type IWatcher interface {
	Switch
	Action
}

func NewHTTPWatcher added in v0.1.4

func NewHTTPWatcher(
	instance *v1alpha1.Repository,
	c client.Client,
	ctx context.Context,
	logger logr.Logger,
	duration time.Duration,
	cancel context.CancelFunc,
	scheme *runtime.Scheme,
	fm map[string]v1alpha1.FilterCond,
) IWatcher

func NewOCIWatcher added in v0.1.4

func NewOCIWatcher(
	instance *v1alpha1.Repository,
	c client.Client,
	ctx context.Context,
	logger logr.Logger,
	duration time.Duration,
	cancel context.CancelFunc,
	scheme *runtime.Scheme,
	fm map[string]v1alpha1.FilterCond,
) IWatcher

func NewWatcher added in v0.1.4

func NewWatcher(
	ctx context.Context,
	logger logr.Logger,
	c client.Client,
	scheme *runtime.Scheme,
	instance *v1alpha1.Repository,
	cancel context.CancelFunc,
) IWatcher

type OCIWatcher added in v0.1.4

type OCIWatcher struct {
	CommonAction
	// contains filtered or unexported fields
}

func (*OCIWatcher) Poll added in v0.1.4

func (c *OCIWatcher) Poll()

Poll the components

func (*OCIWatcher) Start added in v0.1.4

func (c *OCIWatcher) Start() error

func (*OCIWatcher) Stop added in v0.1.4

func (c *OCIWatcher) Stop()

type Switch added in v0.1.4

type Switch interface {
	Start() error
	Stop()
	Poll()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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