controller

package
v0.0.0-...-c993650 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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeCommitPoller

func MakeCommitPoller(cl *http.Client, repo *pollingv1.PolledRepository, endpoint, authToken string) git.CommitPoller

MakeCommitPoller creates the correct poller from the repository with authentication. TODO: allow custom TLS

Types

type EventDispatcher

type EventDispatcher interface {
	Dispatch(ctx context.Context, repo pollingv1.PolledRepository, commit map[string]any) error
}

EventDispatcher implementations publish the commit to the endpoint in the PolledRepository.

type PolledRepositoryReconciler

type PolledRepositoryReconciler struct {
	client.Client
	Log           logr.Logger
	Scheme        *runtime.Scheme
	HTTPClient    *http.Client
	PollerFactory pollerFactoryFunc
	EventDispatcher
	secrets.SecretGetter
}

PolledRepositoryReconciler reconciles a PolledRepository object

func (*PolledRepositoryReconciler) Reconcile

Reconcile is part of the main Kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*PolledRepositoryReconciler) SetupWithManager

func (r *PolledRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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