Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorDetail ¶
type ErrorDetail struct { Err string `db:"err" json:"err,omitempty"` Code errorx.Code `db:"code" json:"code,omitempty"` Fields errorx.Fields `db:"fields" json:"fields,omitempty"` OpTraces []errorx.Op `db:"op_traces" json:"op_traces,omitempty"` Message errorx.Message `db:"message" json:"message,omitempty"` Line errorx.Line `db:"line" json:"line,omitempty"` MetricStatus errorx.MetricStatus `db:"metric_status" json:"metric_status,omitempty"` }
func (*ErrorDetail) Scan ¶
func (e *ErrorDetail) Scan(value interface{}) error
type History ¶
type History struct { ID int64 `db:"id" json:"id"` CreatedAt time.Time `db:"created_at" json:"created_at"` Name string `db:"name" json:"name"` Status string `db:"status" json:"status"` StatusCode int64 `db:"status_code" json:"status_code"` StartedAt time.Time `db:"started_at" json:"started_at"` FinishedAt time.Time `db:"finished_at" json:"finished_at"` Latency int64 `db:"latency" json:"latency"` LatencyText string `db:"latency_text" json:"latency_text"` Error ErrorDetail `db:"error" json:"error"` Metadata HistoryMetadata `db:"metadata" json:"metadata"` }
type HistoryFilter ¶
type HistoryMetadata ¶
type HistoryMetadata struct { MachineID string `db:"machine_id" json:"machine_id,omitempty"` EntryID int64 `db:"entry_id" json:"entry_id,omitempty"` Wave int64 `db:"wave" json:"wave,omitempty"` TotalWave int64 `db:"total_wave" json:"total_wave,omitempty"` IsLastWave bool `db:"is_last_wave" json:"is_last_wave,omitempty"` }
func (*HistoryMetadata) Scan ¶
func (h *HistoryMetadata) Scan(value interface{}) error
type NoopClient ¶
type NoopClient struct{}
func (NoopClient) ReadHistories ¶
func (n NoopClient) ReadHistories(_ context.Context, _ *HistoryFilter) ([]History, error)
func (NoopClient) WriteHistory ¶
func (n NoopClient) WriteHistory(_ context.Context, _ *History) error
type PostgreClient ¶
type PostgreClient struct {
// contains filtered or unexported fields
}
func NewPostgreClient ¶
func NewPostgreClient(db database.PostgreClientItf) *PostgreClient
func (*PostgreClient) ReadHistories ¶
func (p *PostgreClient) ReadHistories(ctx context.Context, req *HistoryFilter) ([]History, error)
func (*PostgreClient) WriteHistory ¶
func (p *PostgreClient) WriteHistory(ctx context.Context, req *History) error
Click to show internal directories.
Click to hide internal directories.