inputhttp

package
v0.0.0-...-3e9a38d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2016 License: LGPL-3.0 Imports: 9 Imported by: 0

README

gogstash input http

Synopsis

{
	"input": [
		{
			"type": "http",

			// (optional), one of ["HEAD", "GET"], default: "GET"
			"method": "GET",

			// (required)
			"url": "",

			// (optional), in seconds, default: 60
			"interval": 60
		}
	]
}

Details

  • type
    • Must be "http"
  • method
    • http request method
  • url
    • http request url
  • interval
    • How often (in seconds) to request a http endpoint.

Documentation

Index

Constants

View Source
const (
	ModuleName = "http"
)

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(confraw *config.ConfigRaw) (retconf config.TypeInputConfig, err error)

Types

type InputConfig

type InputConfig struct {
	config.InputConfig
	Method   string `json:"method,omitempty"` // one of ["HEAD", "GET"]
	Url      string `json:"url"`
	Interval int    `json:"interval,omitempty"`
	// contains filtered or unexported fields
}

func DefaultInputConfig

func DefaultInputConfig() InputConfig

func (*InputConfig) Request

func (t *InputConfig) Request(logger *logrus.Logger, inchan config.InChan)

func (*InputConfig) SendRequest

func (self *InputConfig) SendRequest() (data string, err error)

func (*InputConfig) Start

func (t *InputConfig) Start()

Jump to

Keyboard shortcuts

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