Documentation ¶
Index ¶
- Constants
- type Message
- type MessageType
- type PerformanceStats
- type Report
- type Repository
- func (r *Repository) GetLastCompleteJSON() ([]byte, error)
- func (r *Repository) GetLastJSON() ([]byte, error)
- func (r *Repository) GetLastSuccessfulJSON() ([]byte, error)
- func (r *Repository) MarkAsComplete()
- func (r *Repository) MarkAsSuccessful()
- func (r *Repository) StartNewReport()
- func (r *Repository) UpdateStats(stats Stats)
- func (r *Repository) UpdateStatus(status jobStatus)
- func (r *Repository) Watch(messageChan <-chan Message)
- type Severity
- type Stats
Constants ¶
View Source
const ( Pending jobStatus = "pending" InProgress jobStatus = "build in progress" Success jobStatus = "build successful" Failed jobStatus = "build failed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Type MessageType Severity Severity Text string }
func (Message) MarshalJSON ¶
type MessageType ¶
type MessageType string
const ( GlobalMessage MessageType = "global" IngestorMessage MessageType = "ingestor" PrecomputeMessage MessageType = "precompute" ComputeMessage MessageType = "compute" )
type PerformanceStats ¶
type PerformanceStats struct { DataFetchingDuration time.Duration `json:"data_fetching_duration"` PrecomputeDuration time.Duration `json:"precompute_duration"` ComputeDuration time.Duration `json:"compute_duration"` BuildDuration time.Duration `json:"build_duration"` }
PerformanceStats contains durations of each step of the build pipeline.
func (*PerformanceStats) MarshalJSON ¶
func (p *PerformanceStats) MarshalJSON() ([]byte, error)
MarshalJSON overrides PerformanceStats JSON to pretty print the duration.
type Report ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() Repository
func (*Repository) GetLastCompleteJSON ¶
func (r *Repository) GetLastCompleteJSON() ([]byte, error)
func (*Repository) GetLastJSON ¶
func (r *Repository) GetLastJSON() ([]byte, error)
func (*Repository) GetLastSuccessfulJSON ¶
func (r *Repository) GetLastSuccessfulJSON() ([]byte, error)
func (*Repository) MarkAsComplete ¶
func (r *Repository) MarkAsComplete()
func (*Repository) MarkAsSuccessful ¶
func (r *Repository) MarkAsSuccessful()
func (*Repository) StartNewReport ¶
func (r *Repository) StartNewReport()
func (*Repository) UpdateStats ¶
func (r *Repository) UpdateStats(stats Stats)
func (*Repository) UpdateStatus ¶
func (r *Repository) UpdateStatus(status jobStatus)
func (*Repository) Watch ¶
func (r *Repository) Watch(messageChan <-chan Message)
Click to show internal directories.
Click to hide internal directories.