Documentation
¶
Index ¶
- Constants
- type Emitter
- type HttpEmitter
- type NullEmitter
- type Report
- func (report *Report) Publish()
- func (report *Report) SetIgnore()
- func (report *Report) TaskDone()
- func (report *Report) TaskFailed(errorCode TaskErrorCode, errorMessage string, args ...interface{})
- func (report *Report) TaskStart(kind string, name string)
- func (report *Report) TaskWarning(errorMessage string, args ...interface{})
- func (report *Report) WithRepository(repository *repository.Repository)
- func (report *Report) WithRepositoryName(name string)
- func (report *Report) WithSnapshot(snapshot *snapshot.Snapshot)
- func (report *Report) WithSnapshotID(snapshotId objects.MAC)
- type ReportRepository
- type ReportSnapshot
- type ReportTask
- type Reporter
- type TaskErrorCode
- type TaskStatus
Constants ¶
View Source
const PLAKAR_API_URL = "https://api.plakar.io/v1/reporting/reports"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpEmitter ¶
type HttpEmitter struct {
// contains filtered or unexported fields
}
type NullEmitter ¶
type NullEmitter struct {
}
type Report ¶
type Report struct {
Timestamp time.Time `json:"timestamp"`
Task *ReportTask `json:"report_task,omitempty"`
Repository *ReportRepository `json:"report_repository,omitempty"`
Snapshot *ReportSnapshot `json:"report_snapshot,omitempty"`
// contains filtered or unexported fields
}
func (*Report) TaskFailed ¶ added in v1.0.3
func (report *Report) TaskFailed(errorCode TaskErrorCode, errorMessage string, args ...interface{})
func (*Report) TaskWarning ¶ added in v1.0.3
func (*Report) WithRepository ¶ added in v1.0.3
func (report *Report) WithRepository(repository *repository.Repository)
func (*Report) WithRepositoryName ¶ added in v1.0.3
func (*Report) WithSnapshot ¶ added in v1.0.3
func (*Report) WithSnapshotID ¶ added in v1.0.3
type ReportRepository ¶
type ReportRepository struct {
Name string `json:"name"`
Storage storage.Configuration `json:"storage"`
}
type ReportSnapshot ¶
type ReportTask ¶
type ReportTask struct {
Type string `json:"type"`
Name string `json:"name"`
StartTime time.Time `json:"start_time"`
Duration time.Duration `json:"duration"`
Status TaskStatus `json:"status"`
ErrorCode TaskErrorCode `json:"error_code"`
ErrorMessage string `json:"error_message"`
}
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
func NewReporter ¶
func NewReporter(ctx *appcontext.AppContext) *Reporter
func (*Reporter) StopAndWait ¶ added in v1.0.3
func (reporter *Reporter) StopAndWait()
type TaskErrorCode ¶
type TaskErrorCode uint32
type TaskStatus ¶
type TaskStatus string
const ( StatusOK TaskStatus = "OK" StatusWarning TaskStatus = "WARNING" StatusFailed TaskStatus = "FAILURE" )
Click to show internal directories.
Click to hide internal directories.