api

package
v0.0.0-...-2a9c997 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeRequestBody

func DecodeRequestBody(r *http.Request) ([]byte, error)

Decode request body by content encoding

func IntakeHandler

func IntakeHandler(w http.ResponseWriter, r *http.Request)

func MergeMap

func MergeMap(m1, m2 map[string]string) map[string]string

func ParseEvents

func ParseEvents(req *types.RequestBody) []*types.Event

Parse event "events": { "System": [ { "timestamp": 1476195870.719676, "host": "bogon", "api_key": "8ea42d1939e248c59333070d5fd2f4c3", "msg_text": "Version 5.8.5", "event_type": "Agent Startup" } ], }

func ParseProcesses

func ParseProcesses(ps *types.ProcessStruct) []types.Process

func ParseServiceChecks

func ParseServiceChecks(req *types.RequestBody) ([]types.ServiceCheckOutput, error)

Service checks "service_checks": [ { "status": 3, "tags": null, "timestamp": 1476195870.704261, "check": "ntp.in_sync", "host_name": "bogon", "message": null, "id": 1 },

func ParseStringTag

func ParseStringTag(sa []string) map[string]string

func SeriesHandler

func SeriesHandler(w http.ResponseWriter, r *http.Request)

func SetLicenseValidator

func SetLicenseValidator(url string)

Types

type Record

type Record struct {
	Url    string
	Method string
	Header map[string][]string
	Body   string
}

Jump to

Keyboard shortcuts

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