Documentation
¶
Overview ¶
Package sync applies deployment GitOps syncs: it clones the source, stages and promotes project files, and redeploys the linked project or stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReconcileRevision ¶
func ReconcileRevision(ctx context.Context, previous scheduler.Run, record *projectpkg.GitOpsSync, outcome scheduler.Outcome) (scheduler.Outcome, error)
ReconcileRevision confirms an interrupted run when the record already holds the source revision that run pinned.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service runs deployment syncs. Shared sync limits, error events and job registration stay with the parent and arrive as callbacks.
func New ¶
func New( db *database.DB, repoService *gitrepo.GitRepositoryService, projectService *projectpkg.ProjectService, swarmService *swarm.SwarmService, eventService *event.EventService, limits func(context.Context, *projectpkg.GitOpsSync) (int, int64, int64), logError func(context.Context, *projectpkg.GitOpsSync, user.Actor, string), unregisterJob func(context.Context, string), ) *Service
func (*Service) DirectoryProject ¶
func (s *Service) DirectoryProject(ctx context.Context, sync *projectpkg.GitOpsSync) (*projectpkg.Project, error)
DirectoryProject resolves the linked project for a directory sync, relinking or recovering it when the stored reference is stale.
func (*Service) Run ¶
func (s *Service) Run(ctx context.Context, sync *projectpkg.GitOpsSync, actor user.Actor, result *gitops.SyncResult) (*gitops.SyncResult, error)
Run clones the sync source and applies it to its project or Swarm stack.
Click to show internal directories.
Click to hide internal directories.