Documentation ¶
Index ¶
- Constants
- func SetUpClientTest(t *testing.T) *testEngine
- type Clients
- func (client *Clients) DeployPinnedTag(conf *viper.Viper, repoName string)
- func (client *Clients) GetCachedTagDigest(repoName string) (string, error)
- func (client *Clients) GetCachedTags(repoName string) ([]string, error)
- func (client *Clients) GetFormattedPinnedTag(repoName string) (string, error)
- func (client *Clients) PopulateCaches(repoName string)
- func (client *Clients) ShouldDeploy(repoName string) (bool, error)
- func (client *Clients) UpdateCaches(repoName string)
- type DeployedRepositoryVersionRow
- type DockerRegistryClient
- type NomadClient
- func (client *NomadClient) GetNomadJobTag(jobID, imageName string) (string, error)
- func (client *NomadClient) MonitorNomadJob(evalID, jobID, desiredTag string)
- func (client *NomadClient) RestartNomadJob(job *nomad.Job, desiredTag string)
- func (client *NomadClient) UpdateNomadJobTag(jobID, imageName, taskName, desiredTag string)
- type PostgresClient
- func (client *PostgresClient) GetAllTags() (map[string]string, error)
- func (client *PostgresClient) GetAutoDeployFlag(repoName string) (bool, error)
- func (client *PostgresClient) GetPinnedTag(repoName string) (string, error)
- func (client *PostgresClient) UpdateAutoDeployFlag(repoName string, autoDeploy bool) error
- func (client *PostgresClient) UpdatePinnedTag(repoName, pinnedTag string) error
Constants ¶
View Source
const CreateTablesSQL = `` /* 210-byte string literal not displayed */
View Source
const InsertRowSql = `` /* 149-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func SetUpClientTest ¶
Types ¶
type Clients ¶
type Clients struct { NomadClient *NomadClient DockerRegistryClient *DockerRegistryClient PostgresClient *PostgresClient DockerTags sync.Map DigestMap sync.Map // for test usage only NomadServer *testutil.TestServer }
func SetUpClients ¶
func (*Clients) DeployPinnedTag ¶
func (*Clients) GetCachedTagDigest ¶
func (*Clients) GetCachedTags ¶
func (*Clients) GetFormattedPinnedTag ¶
fetches the CACHED pinned tag
func (*Clients) PopulateCaches ¶
func (*Clients) ShouldDeploy ¶
this function compares cached values with the actual values, so only update the cache after calling, not before
func (*Clients) UpdateCaches ¶
type DockerRegistryClient ¶
type DockerRegistryClient struct { Hubs map[string]registry.Registry // contains filtered or unexported fields }
func InitializeDockerRegistryClient ¶
func InitializeDockerRegistryClient(conf *viper.Viper) *DockerRegistryClient
func (*DockerRegistryClient) GetAllTags ¶
func (e *DockerRegistryClient) GetAllTags(repoName string) ([]string, error)
func (*DockerRegistryClient) GetTagDigest ¶
func (e *DockerRegistryClient) GetTagDigest(repoName, tag string) (string, error)
type NomadClient ¶
type NomadClient struct {
// contains filtered or unexported fields
}
func InitializeNomadClient ¶
func InitializeNomadClient(conf *viper.Viper) *NomadClient
func (*NomadClient) GetNomadJobTag ¶
func (client *NomadClient) GetNomadJobTag(jobID, imageName string) (string, error)
func (*NomadClient) MonitorNomadJob ¶
func (client *NomadClient) MonitorNomadJob(evalID, jobID, desiredTag string)
Monitor the progress of a Nomad job deployment and posts a slack update on the outcome
func (*NomadClient) RestartNomadJob ¶
func (client *NomadClient) RestartNomadJob(job *nomad.Job, desiredTag string)
There is no way to restart a job through the API currently https://github.com/hashicorp/nomad/issues/698
func (*NomadClient) UpdateNomadJobTag ¶
func (client *NomadClient) UpdateNomadJobTag(jobID, imageName, taskName, desiredTag string)
Updates one image in a Nomad job, unless the Nomad jobspec is registrywatcher itself. Since the registrywatcher Nomad jobspec contains 2 images (UI and backend), it will update both images before it restarts itself.
type PostgresClient ¶
type PostgresClient struct {
// contains filtered or unexported fields
}
func InitializePostgresClient ¶
func InitializePostgresClient(conf *viper.Viper) (*PostgresClient, error)
Initialize creates tables if they do not exist cloud agnostic function
func (*PostgresClient) GetAllTags ¶
func (client *PostgresClient) GetAllTags() (map[string]string, error)
func (*PostgresClient) GetAutoDeployFlag ¶
func (client *PostgresClient) GetAutoDeployFlag(repoName string) (bool, error)
func (*PostgresClient) GetPinnedTag ¶
func (client *PostgresClient) GetPinnedTag(repoName string) (string, error)
func (*PostgresClient) UpdateAutoDeployFlag ¶
func (client *PostgresClient) UpdateAutoDeployFlag(repoName string, autoDeploy bool) error
func (*PostgresClient) UpdatePinnedTag ¶
func (client *PostgresClient) UpdatePinnedTag(repoName, pinnedTag string) error
Click to show internal directories.
Click to hide internal directories.