Documentation
¶
Overview ¶
Package reconcilers contains the reconcilers for the various types of entities in mediator.
Index ¶
Constants ¶
View Source
const ( // InternalReconcilerEventTopic is the topic for internal reconciler events InternalReconcilerEventTopic = "internal.repo.reconciler.event" // InternalPolicyInitEventTopic is the topic for internal init events InternalPolicyInitEventTopic = "internal.policy.init.event" )
Variables ¶
View Source
var CONTAINER_TYPE = "container"
CONTAINER_TYPE is the type for container artifacts
Functions ¶
func NewPolicyInitMessage ¶
NewPolicyInitMessage creates a new repos init event
Types ¶
type PolicyInitEvent ¶
type PolicyInitEvent struct {
// Project is the project that the event is relevant to
Project uuid.UUID `json:"project" validate:"gte=0"`
}
PolicyInitEvent is an event that is sent to the reconciler topic when a new policy is created. It is used to initialize the policy by iterating over all registered entities for the relevant group and sending a policy evaluation event for each one.
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is a helper that reconciles entities
func NewReconciler ¶
func NewReconciler(store db.Store, evt *events.Eventer, authCfg *config.AuthConfig) (*Reconciler, error)
NewReconciler creates a new reconciler object
func (*Reconciler) Register ¶
func (e *Reconciler) Register(r events.Registrar)
Register implements the Consumer interface.
type RepoReconcilerEvent ¶
type RepoReconcilerEvent struct {
// Project is the group that the event is relevant to
Project uuid.UUID `json:"group" validate:"gte=0"`
// Repository is the repository to be reconciled
Repository int32 `json:"repository" validate:"gte=0"`
}
RepoReconcilerEvent is an event that is sent to the reconciler topic
Click to show internal directories.
Click to hide internal directories.