Documentation ¶
Index ¶
- type Daemon
- func (d *Daemon) Export(ctx context.Context) ([]byte, error)
- func (d *Daemon) GitRepoConfig(ctx context.Context, regenerate bool) (v6.GitConfig, error)
- func (d *Daemon) JobStatus(ctx context.Context, jobID job.ID) (job.Status, error)
- func (d *Daemon) ListImages(ctx context.Context, spec update.ResourceSpec) ([]v6.ImageStatus, error)
- func (d *Daemon) ListImagesWithOptions(ctx context.Context, opts v10.ListImagesOptions) ([]v6.ImageStatus, error)
- func (d *Daemon) ListServices(ctx context.Context, namespace string) ([]v6.ControllerStatus, error)
- func (d *Daemon) ListServicesWithOptions(ctx context.Context, opts v11.ListServicesOptions) ([]v6.ControllerStatus, error)
- func (d *Daemon) LogEvent(ev event.Event) error
- func (d *Daemon) Loop(stop chan struct{}, wg *sync.WaitGroup, logger log.Logger)
- func (d *Daemon) NotifyChange(ctx context.Context, change v9.Change) error
- func (d *Daemon) Ping(ctx context.Context) error
- func (d *Daemon) Sync(ctx context.Context, started time.Time, newRevision string, rat ratchet) error
- func (d *Daemon) SyncStatus(ctx context.Context, commitRef string) ([]string, error)
- func (d *Daemon) UpdateManifests(ctx context.Context, spec update.Spec) (job.ID, error)
- func (d *Daemon) Version(ctx context.Context) (string, error)
- func (d *Daemon) WithReadonlyClone(ctx context.Context, fn func(*git.Export) error) error
- func (d *Daemon) WithWorkingClone(ctx context.Context, fn func(*git.Checkout) error) error
- type LoopVars
- type SyncErrors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Daemon ¶
type Daemon struct { V string Cluster cluster.Cluster Manifests manifests.Manifests Registry registry.Registry ImageRefresh chan image.Name Repo *git.Repo GitConfig git.Config Jobs *job.Queue JobStatusCache *job.StatusCache EventWriter event.EventWriter Logger log.Logger ManifestGenerationEnabled bool GitSecretEnabled bool // bookkeeping *LoopVars }
Daemon is the fully-functional state of a daemon (compare to `NotReadyDaemon`).
func (*Daemon) GitRepoConfig ¶
func (*Daemon) JobStatus ¶
JobStatus - Ask the daemon how far it's got committing things; in particular, is the job queued? running? committed? If it is done, the commit ref is returned.
func (*Daemon) ListImages ¶
func (d *Daemon) ListImages(ctx context.Context, spec update.ResourceSpec) ([]v6.ImageStatus, error)
ListImages - deprecated from v10, lists the images available for set of workloads
func (*Daemon) ListImagesWithOptions ¶
func (d *Daemon) ListImagesWithOptions(ctx context.Context, opts v10.ListImagesOptions) ([]v6.ImageStatus, error)
ListImagesWithOptions lists the images available for set of workloads
func (*Daemon) ListServices ¶
func (*Daemon) ListServicesWithOptions ¶
func (d *Daemon) ListServicesWithOptions(ctx context.Context, opts v11.ListServicesOptions) ([]v6.ControllerStatus, error)
func (*Daemon) NotifyChange ¶
Tell the daemon to synchronise the cluster with the manifests in the git repo. This has an error return value because upstream there may be comms difficulties or other sources of problems; here, we always succeed because it's just bookkeeping.
func (*Daemon) Sync ¶
func (d *Daemon) Sync(ctx context.Context, started time.Time, newRevision string, rat ratchet) error
Sync starts the synchronization of the cluster with git.
func (*Daemon) SyncStatus ¶
Ask the daemon how far it's got applying things; in particular, is it past the given commit? Return the list of commits between where we have applied (the sync tag) and the ref given, inclusive. E.g., if you send HEAD, you'll get all the commits yet to be applied. If you send a hash and it's applied at or _past_ it, you'll get an empty list.
func (*Daemon) UpdateManifests ¶
Apply the desired changes to the config files
func (*Daemon) WithReadonlyClone ¶
WithReadonlyClone applies the given func to an export of the current revision of the git repo. Use this if you just need to consult the files.
func (*Daemon) WithWorkingClone ¶
WithWorkingClone applies the given func to a fresh, writable clone of the git repo, and cleans it up afterwards. This may return an error in the case that the repo is read-only; use `WithReadonlyClone` if you only need to read the files in the git repo.
type LoopVars ¶
type LoopVars struct { SyncInterval time.Duration SyncTimeout time.Duration AutomationInterval time.Duration GitTimeout time.Duration GitVerifySignaturesMode fluxsync.VerifySignaturesMode SyncState fluxsync.State ImageScanDisabled bool // contains filtered or unexported fields }
func (*LoopVars) AskForAutomatedWorkloadImageUpdates ¶
func (d *LoopVars) AskForAutomatedWorkloadImageUpdates()
Ask for an image poll, or if there's one waiting, let that happen.
func (*LoopVars) AskForSync ¶
func (d *LoopVars) AskForSync()
Ask for a sync, or if there's one waiting, let that happen.
type SyncErrors ¶
type SyncErrors struct {
// contains filtered or unexported fields
}