beater

package
v0.0.0-...-e3e8c6c Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(b *beat.Beat, cfg *common.Config) (beat.Beater, error)

Types

type HttpEvent

type HttpEvent struct {
	ReadTime     time.Time
	DocumentType string
	Fields       map[string]string
	Request      Request
	Response     Response
}

func (*HttpEvent) ToMapStr

func (h *HttpEvent) ToMapStr() common.MapStr

type Httpbeat

type Httpbeat struct {
	HbConfig config.ConfigSettings
	// contains filtered or unexported fields
}

func (*Httpbeat) Cleanup

func (h *Httpbeat) Cleanup(b *beat.Beat) error

func (*Httpbeat) Run

func (h *Httpbeat) Run(b *beat.Beat) error

func (*Httpbeat) Stop

func (h *Httpbeat) Stop()

type Poller

type Poller struct {
	// contains filtered or unexported fields
}

func NewPooler

func NewPooler(httpbeat *Httpbeat, config config.HostConfig) *Poller

func (*Poller) GetResponseHeader

func (p *Poller) GetResponseHeader(response gorequest.Response) map[string]string

func (*Poller) Run

func (p *Poller) Run()

func (*Poller) Stop

func (p *Poller) Stop()

type Request

type Request struct {
	Url     string            `json:"url"`
	Method  string            `json:"method"`
	Headers map[string]string `json:"headers,omitempty"`
	Body    string            `json:"body,omitempty"`
}

type Response

type Response struct {
	StatusCode   int                    `json:"code"`
	StatusPhrase string                 `json:"phrase"`
	Headers      map[string]string      `json:"headers,omitempty"`
	Body         string                 `json:"body,omitempty"`
	JsonBody     map[string]interface{} `json:"jsonBody,omitempty"`
}

Jump to

Keyboard shortcuts

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