httpcheck

package
v0.0.0-...-5c7ffcf Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxBodyLimit = 10 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL            string            `json:"url"`
	Headers        map[string]string `json:"headers"`
	Timeout        time.Duration     `json:"timeout"`
	Method         string            `json:"method"`
	SuccessCodes   []int             `json:"successCodes"`
	SuccessRegexps []*regexp.Regexp  `json:"successRegexps"`
	BodyLimit      int64             `json:"bodyLimit"`
	NetworkMode    string            `json:"networkMode"`
}

我们的插件必须是最少依赖的, 可以被直接运行的

type Input

type Input struct {
	Config *Config
	// contains filtered or unexported fields
}

func (*Input) Collect

func (i *Input) Collect(accumulator api.Accumulator) error

func (*Input) ExecuteRequest

func (i *Input) ExecuteRequest(configBytes []byte) ([]byte, error)

func (*Input) GenerateErrorMetrics

func (i *Input) GenerateErrorMetrics(a api.Accumulator)

func (*Input) GetDefaultPrefix

func (i *Input) GetDefaultPrefix() string

func (*Input) NetworkMode

func (i *Input) NetworkMode() string

func (*Input) ProcessResponse

func (i *Input) ProcessResponse(_ interface{}, respBytes []byte, err error, accumulator api.Accumulator) error

func (*Input) SerializeRequest

func (i *Input) SerializeRequest() (interface{}, string, []byte, time.Duration, error)

Jump to

Keyboard shortcuts

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