Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployer ¶
type Deployer interface { // Start must be called only once to start the job processing Start() // Stop must be called only once and when start has been called Stop() // Deploy triggers a job to deploy a release. It returns a jobID that can be // used to check the job's status. Deploy(releaseID, tag string, releaseURL *url.URL) (string, error) // GetStatus returns the status of a job GetStatus(jobID string) (JobStatus, error) // GetLatestTag returns the latest tag associated to the release. If not tag // is found, returns 'unknown'. GetLatestTag(releaseID string) (string, error) }
Deployer defines the primitive needed to deploy releases
func NewFileDeployer ¶
func NewFileDeployer(db *buntdb.DB, conf config.Config, client HTTPClient, logger zerolog.Logger) Deployer
NewFileDeployer returns a new initialized file deployer
type FileDeployer ¶
FileDeployer implements a Deployer that deploys releases on disk.
- implements deployer.Deployer
func (*FileDeployer) GetLatestTag ¶ added in v1.0.0
func (fd *FileDeployer) GetLatestTag(releaseID string) (string, error)
GetLatestTag implements deployer.Deployer
func (*FileDeployer) GetStatus ¶
func (fd *FileDeployer) GetStatus(key string) (JobStatus, error)
GetStatus implements deployer.Deployer
func (*FileDeployer) Start ¶
func (fd *FileDeployer) Start()
Start implements deployer.Deployer. This is a blocking function that handles jobs. It must be called only once.
func (*FileDeployer) Stop ¶
func (fd *FileDeployer) Stop()
Stop implements deployer.Deployer. Must be called only once and if already started.
type HTTPClient ¶
HTTPClient defines the function we expect from an HTTP client
type JSONSerde ¶
type JSONSerde struct{}
JSONSerde defines a serde type based on JSON
- implements deployer.serde
Click to show internal directories.
Click to hide internal directories.