events

package
v0.0.0-...-955e4e8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntTimeWrapper

type IntTimeWrapper struct {
	time.Time
}

Wrapper for time.Time for easy unmarshaling: time.Times unmarshal function requires a string in time.UnixDate format, but Jolokia returns an int in a string (duh!)

func (*IntTimeWrapper) UnmarshalJSON

func (cT *IntTimeWrapper) UnmarshalJSON(bs []byte) error

Unmarshals an integer into time.Time Converts the bytes into string and then uses the last 3 digits as nanos and converts this using the time.Unix() function Example: The byte representation of the string "12345678" will be interpreted as 12345.678 secs in unix time

type Notification

type Notification struct {
	TimeStamp      IntTimeWrapper `json:"timeStamp"`
	SequenceNumber int            `json:"sequenceNumber"`
	// Data of the JMX-event
	UserData json.RawMessage `json:"userData"`
	Source   string          `json:"source"`
	Message  string          `json:"message"`
	Type     string          `json:"type"`
}

Notification of the JMX Event

type Root

type Root struct {
	Dropped       int            `json:"dropped"`
	Handle        string         `json:"handle"`
	Handback      string         `json:"handback"`
	Notifications []Notification `json:"notifications"`
}

Root of an JMXEvent exposed by Jolokia

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL