Skip to content

Commit

Permalink
Start removing some extra complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Aug 9, 2018
1 parent e5de706 commit cd64b9b
Showing 1 changed file with 0 additions and 47 deletions.
47 changes: 0 additions & 47 deletions ndt7/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,53 +74,6 @@ func NewClient(settings Settings) Client {
return cl
}

// EvKey uniquely identifies an event.
type EvKey int

const (
// LogEvent indicates an event containing a log message
LogEvent = EvKey(iota)
// MeasurementEvent indicates an event containing some measurements
MeasurementEvent
// FailureEvent indicates an event containing an error
FailureEvent
)

// Event is the structure of a generic event
type Event struct {
Key EvKey // Tells you the kind of the event
Value interface{} // Opaque event value
}

// Severity indicates the severity of a log message
type Severity int

const (
// LogWarning indicates a warning message
LogWarning = Severity(iota)
// LogInfo indicates an informational message
LogInfo
// LogDebug indicates a debug message
LogDebug
)

// LogRecord is the structure of a log event
type LogRecord struct {
Severity Severity // Message severity
Message string // The message
}

// MeasurementRecord is the structure of a measurement event
type MeasurementRecord struct {
Measurement // The measurement
IsLocal bool `json:"is_local"` // Whether it is a local measurement
}

// FailureRecord is the structure of a failure event
type FailureRecord struct {
Err error // The error that occurred
}

// defaultTimeout is the default value of the I/O timeout.
const defaultTimeout = 1 * time.Second

Expand Down

0 comments on commit cd64b9b

Please sign in to comment.