daemon

package
v0.0.0-...-c42b1bb Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

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      cluster.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
	// bookkeeping
	*LoopVars
}

Daemon is the fully-functional state of a daemon (compare to `NotReadyDaemon`).

func (*Daemon) Export

func (d *Daemon) Export(ctx context.Context) ([]byte, error)

func (*Daemon) GitRepoConfig

func (d *Daemon) GitRepoConfig(ctx context.Context, regenerate bool) (v6.GitConfig, error)

func (*Daemon) JobStatus

func (d *Daemon) JobStatus(ctx context.Context, jobID job.ID) (job.Status, error)

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 services

func (*Daemon) ListImagesWithOptions

func (d *Daemon) ListImagesWithOptions(ctx context.Context, opts v10.ListImagesOptions) ([]v6.ImageStatus, error)

ListImagesWithOptions lists the images available for set of services

func (*Daemon) ListServices

func (d *Daemon) ListServices(ctx context.Context, namespace string) ([]v6.ControllerStatus, error)

func (*Daemon) LogEvent

func (d *Daemon) LogEvent(ev event.Event) error

func (*Daemon) Loop

func (d *Daemon) Loop(stop chan struct{}, wg *sync.WaitGroup, logger log.Logger)

func (*Daemon) NotifyChange

func (d *Daemon) NotifyChange(ctx context.Context, change v9.Change) error

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) Ping

func (d *Daemon) Ping(ctx context.Context) error

func (*Daemon) SyncStatus

func (d *Daemon) SyncStatus(ctx context.Context, commitRef string) ([]string, error)

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

func (d *Daemon) UpdateManifests(ctx context.Context, spec update.Spec) (job.ID, error)

Apply the desired changes to the config files

func (*Daemon) Version

func (d *Daemon) Version(ctx context.Context) (string, error)

func (*Daemon) WithClone

func (d *Daemon) WithClone(ctx context.Context, fn func(*git.Checkout) error) error

type LoopVars

type LoopVars struct {
	SyncInterval         time.Duration
	RegistryPollInterval time.Duration
	// contains filtered or unexported fields
}

func (*LoopVars) AskForImagePoll

func (d *LoopVars) AskForImagePoll()

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.

Jump to

Keyboard shortcuts

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