Documentation
¶
Index ¶
- func DestructiveReMigrateForTest(cfg *config.Postgres) error
- func Transact(pg *Postgres, txFunc func(*DBTrans) error) error
- type DBTrans
- type NewRollout
- type NodeSegment
- type NodeSegmentWithRollouts
- type PolicyRev
- type Postgres
- func (p *Postgres) AddPolicyCookbooks(ctx context.Context, cookbooks []backend.PolicyCookbookLock, ...) error
- func (p *Postgres) Clear() error
- func (p *Postgres) Close() error
- func (p *Postgres) Connect() error
- func (p *Postgres) CreateRollout(ctx context.Context, r *NewRollout) (*Rollout, error)
- func (p *Postgres) CreateRolloutFromChefAction(ctx context.Context, r *NewRollout) error
- func (db *Postgres) DestructiveReMigrateForTest() error
- func (p *Postgres) FindRolloutByID(ctx context.Context, id int32) (*Rollout, error)
- func (p *Postgres) FindRolloutByNodeSegmentAndTime(nodeSegment *NodeSegment, time *time.Time) (*Rollout, error)
- func (p *Postgres) GetPolicyCookbooks(revisionID string) (backend.PolicyCookbooks, error)
- func (p *Postgres) GetRollouts(ctx context.Context) ([]*Rollout, error)
- func (pg *Postgres) GetTelemetry(ctx context.Context) (Telemetry, error)
- func (p *Postgres) ListNodeSegmentsForRolloutProgress() ([]*NodeSegmentWithRollouts, error)
- func (p *Postgres) Migrate() error
- func (p *Postgres) Ping() error
- func (pg *Postgres) UpdateTelemetryReported(ctx context.Context, req *request.UpdateTelemetryReportedRequest) error
- type Rollout
- type RolloutWithOrderIndex
- type Telemetry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBTrans ¶
type DBTrans struct {
*gorp.Transaction
}
type NewRollout ¶
type NewRollout struct {
Id int32 `db:"id, primarykey, autoincrement"`
PolicyName string `db:"policy_name"`
PolicyNodeGroup string `db:"policy_node_group"`
PolicyRevisionId string `db:"policy_revision_id"`
PolicyDomainURL string `db:"policy_domain_url"`
PolicyDomainUsername string `db:"policy_domain_username"`
SCMType string `db:"scm_type"`
SCMWebType string `db:"scm_web_type"`
PolicySCMURL string `db:"policy_scm_url"`
PolicySCMWebURL string `db:"policy_scm_web_url"`
PolicySCMCommit string `db:"policy_scm_commit"`
SCMAuthorName string `db:"scm_author_name"`
SCMAuthorEmail string `db:"scm_author_email"`
Description string `db:"description"`
CiJobId string `db:"ci_job_id"`
CiJobUrl string `db:"ci_job_url"`
}
type NodeSegment ¶
type NodeSegmentWithRollouts ¶
type NodeSegmentWithRollouts struct {
NodeSegment
Rollouts []*Rollout
}
type Postgres ¶
func (*Postgres) AddPolicyCookbooks ¶
func (*Postgres) CreateRollout ¶
CreateRollout takes the given rollout attributes and attempts to store the rollout in the database.
func (*Postgres) CreateRolloutFromChefAction ¶
func (p *Postgres) CreateRolloutFromChefAction(ctx context.Context, r *NewRollout) error
func (*Postgres) DestructiveReMigrateForTest ¶
func (*Postgres) FindRolloutByID ¶
func (*Postgres) FindRolloutByNodeSegmentAndTime ¶
func (*Postgres) GetPolicyCookbooks ¶
func (p *Postgres) GetPolicyCookbooks(revisionID string) (backend.PolicyCookbooks, error)
func (*Postgres) GetRollouts ¶
func (*Postgres) GetTelemetry ¶
GetTelemetry Get last client run telemetry reported timestamp
func (*Postgres) ListNodeSegmentsForRolloutProgress ¶
func (p *Postgres) ListNodeSegmentsForRolloutProgress() ([]*NodeSegmentWithRollouts, error)
func (*Postgres) UpdateTelemetryReported ¶
func (pg *Postgres) UpdateTelemetryReported(ctx context.Context, req *request.UpdateTelemetryReportedRequest) error
UpdateLastTelemetryReported Upsert the last client run telemetry reported date in postgres
type Rollout ¶
type Rollout struct {
NewRollout
StartTime *time.Time `db:"start_time"`
EndTime *time.Time `db:"end_time"`
}
type RolloutWithOrderIndex ¶
Click to show internal directories.
Click to hide internal directories.