blob: b819ea0dc0146081235f3621cfe2580d75d67fbf [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file
package catapult
// Types of Catapult Diagnostics.
//
// Every Diagnostic must have a Type value from this list. For a list of all
// Diagnostic types, see:
// https://github.com/catapult-project/catapult/blob/master/docs/histogram-set-json-format.md#diagnostics
const (
DiagnosticTypeGenericSet = "GenericSet"
)
// Diagnostic is an interface for Catapult Diagnostics.
type Diagnostic interface {
// GetGUID returns the GUID of this diagnostic.
GetGUID() string
}
// GenericSetDiagnostic stores arbitary untyped data in Histograms.
type GenericSetDiagnostic struct {
Type string `json:"type"`
GUID string `json:"guid"`
Values []interface{} `json:"values"`
}
func (d *GenericSetDiagnostic) GetGUID() string {
return d.GUID
}