http

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Config

type Config struct {
	MessageField param.ParaKey `config:"message_field"`

	Schema    string            `config:"schema"`     //support variable
	Hosts     []string          `config:"hosts"`      //support variable
	Method    string            `config:"method"`     //support variable
	Path      string            `config:"path"`       //support variable
	Headers   map[string]string `config:"headers"`    //support variable
	BasicAuth *model.BasicAuth  `config:"basic_auth"` //support variable
	TLSConfig *config.TLSConfig `config:"tls"`        //client tls config

	ValidatedStatusCode []int `config:"valid_status_code"` //validated status code, default 200

	//host
	MaxSendingQPS       int `config:"max_sending_qps"`
	MaxConnection       int `config:"max_connection_per_node"`
	MaxResponseBodySize int `config:"max_response_size"`
	MaxRetryTimes       int `config:"max_retry_times"`
	RetryDelayInMs      int `config:"retry_delay_in_ms"`

	MaxConnWaitTimeout  time.Duration `config:"max_conn_wait_timeout"`
	MaxIdleConnDuration time.Duration `config:"max_idle_conn_duration"`
	MaxConnDuration     time.Duration `config:"max_conn_duration"`
	Timeout             time.Duration `config:"timeout"`
	ReadTimeout         time.Duration `config:"read_timeout"`
	WriteTimeout        time.Duration `config:"write_timeout"`
	ReadBufferSize      int           `config:"read_buffer_size"`
	WriteBufferSize     int           `config:"write_buffer_size"`
}

type HTTPProcessor

type HTTPProcessor struct {
	HTTPPool *fasthttp.RequestResponsePool
	// contains filtered or unexported fields
}

func (*HTTPProcessor) Name

func (processor *HTTPProcessor) Name() string

func (*HTTPProcessor) Process

func (processor *HTTPProcessor) Process(ctx *pipeline.Context) error

Jump to

Keyboard shortcuts

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