registerEvent

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Sse  SseInfo  `json:"sse"`
	Pull PullInfo `json:"pull"`
}

Backend contains information of the parameters for pull or sse mode

type PullInfo

type PullInfo struct {
	MaxEntries int    `json:"maxEntries"`
	Store      string `json:"store"`
}

PullInfo contains information of how much entries can be pulled at once

type Request

type Request struct {
	messages.BaseRequest
	// Mode for JMXEvents. Can be SSE or Pull-based.
	Mode string `json:"mode"`
	// ClientID of the Jolokia Client
	ClientID string `json:"client"`
}

Request represents the fields needed for a request to register a client identified by the ClientID field for JMX Notifications on a MBean. The value of the response is represented in responses.ResponseValue

func (*Request) POSTBody

func (re *Request) POSTBody() ([]byte, error)

Returns a JSON representation of the struct to use as body when making POST requests Simply calls SimplePOSTImpl

type ResponseValue

type ResponseValue struct {
	Backend Backend `json:"backend"`
	Id      string  `json:"id"`
}

ResponseValue contains the root of the value field when a register request was made

func DecodeResponseValue

func DecodeResponseValue(value json.RawMessage) (reg ResponseValue, err error)

type SseInfo

type SseInfo struct {
	ContentType string `json:"backChannel.contentType"`
	Encoding    string `json:"backChannel.encoding"`
}

SseInfo contains information of contenttypes and encoding of sse events

Jump to

Keyboard shortcuts

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