httpserver

package
v1.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadRequest added in v1.4.0

func BadRequest(res http.ResponseWriter)

func InternalServerError added in v1.4.0

func InternalServerError(res http.ResponseWriter)

func MethodNotAllowed added in v1.4.0

func MethodNotAllowed(res http.ResponseWriter)

func TooLarge added in v1.4.0

func TooLarge(res http.ResponseWriter)

Types

type ServiceHTTP

type ServiceHTTP struct {
	DumpDataKeepFiles  int
	DumpData           bool   // would dump the received data to a local file, which is only used to valid data by the developers.
	Decoder            string // the decoder to use, default is "ext_default_decoder"
	Format             string
	Address            string
	Path               string
	ReadTimeoutSec     int
	ShutdownTimeoutSec int
	MaxBodySize        int64
	UnlinkUnixSock     bool
	FieldsExtend       bool
	DisableUncompress  bool
	AllowUnsafeMode    bool
	Tags               map[string]string // todo for v2

	// params below works only for version v2
	QueryParams       []string
	HeaderParams      []string
	QueryParamPrefix  string
	HeaderParamPrefix string
	// contains filtered or unexported fields
}

ServiceHTTP ...

func (*ServiceHTTP) Collect

func (s *ServiceHTTP) Collect(pipeline.Collector) error

Collect takes in an accumulator and adds the metrics that the Input gathers. This is called every "interval"

func (*ServiceHTTP) Description

func (s *ServiceHTTP) Description() string

Description ...

func (*ServiceHTTP) Init

func (s *ServiceHTTP) Init(context pipeline.Context) (int, error)

Init ...

func (*ServiceHTTP) ServeHTTP

func (s *ServiceHTTP) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*ServiceHTTP) Start

func (s *ServiceHTTP) Start(c pipeline.Collector) error

Start starts the ServiceInput's service, whatever that may be

func (*ServiceHTTP) StartService added in v1.4.0

func (s *ServiceHTTP) StartService(context pipeline.PipelineContext) error

StartService start the ServiceInput's service by plugin runner v2

func (*ServiceHTTP) Stop

func (s *ServiceHTTP) Stop() error

Stop stops the services and closes any necessary channels and connections

Jump to

Keyboard shortcuts

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