Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedError ¶
type ErrorAggregate ¶
type ErrorAggregate struct { AggregationKey string `json:"aggregation_key"` TotalCount int `json:"total_count"` Severity string `json:"severity"` LatestErrors []ErrorWithContext `json:"latest_errors"` CreatedAt int64 `json:"created_at"` }
func (*ErrorAggregate) Scan ¶
func (e *ErrorAggregate) Scan(src interface{}) error
type ErrorInstance ¶
type ErrorInstance struct { Class string `json:"class"` Message string `json:"message"` Stacktrace []string `json:"stacktrace"` Cause *ErrorInstance `json:"cause"` }
type ErrorWithContext ¶
type ErrorWithContext struct { Error ErrorInstance `json:"error"` UUID string `json:"uuid"` Timestamp int64 `json:"timestamp"` Severity string `json:"severity"` HTTPContext *HTTPContext `json:"http_context"` }
type ErrorsRepository ¶
type ErrorsRepository interface { GetErrors(serviceName string, numberOfErrors int) ([]ErrorAggregate, error) ReplaceErrors(serviceName string, errors []ErrorAggregate) GetServices() []string ResolveError(serviceName string, key string) error SearchResolved(serviceName string, key string) bool RemoveResolved(serviceName string, key string) TargetsRepository }
func NewMemoryRepository ¶
func NewMemoryRepository() ErrorsRepository
func NewORMRepository ¶
func NewORMRepository(db *gorm.DB) ErrorsRepository
func NewRepository ¶
func NewRepository(repositoryConfig config.Repository) ErrorsRepository
NewRepository is a factory function for ErrorRepository interfaces. It creates a repository based on the configured repository.
type HTTPContext ¶
Click to show internal directories.
Click to hide internal directories.