httpacquisition

package
v1.6.9-rc1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: MIT Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthConfig

type BasicAuthConfig struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type HTTPSource

type HTTPSource struct {
	Config HttpConfiguration

	Server *http.Server
	// contains filtered or unexported fields
}

func (*HTTPSource) CanRun

func (h *HTTPSource) CanRun() error

func (*HTTPSource) Configure

func (h *HTTPSource) Configure(yamlConfig []byte, logger *log.Entry, metricsLevel int) error

func (*HTTPSource) ConfigureByDSN

func (h *HTTPSource) ConfigureByDSN(string, map[string]string, *log.Entry, string) error

func (*HTTPSource) Dump

func (h *HTTPSource) Dump() interface{}

func (*HTTPSource) GetAggregMetrics

func (h *HTTPSource) GetAggregMetrics() []prometheus.Collector

func (*HTTPSource) GetMetrics

func (h *HTTPSource) GetMetrics() []prometheus.Collector

func (*HTTPSource) GetMode

func (h *HTTPSource) GetMode() string

func (*HTTPSource) GetName

func (h *HTTPSource) GetName() string

func (*HTTPSource) GetUuid

func (h *HTTPSource) GetUuid() string

func (*HTTPSource) OneShotAcquisition

func (h *HTTPSource) OneShotAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error

func (*HTTPSource) RunServer

func (h *HTTPSource) RunServer(out chan types.Event, t *tomb.Tomb) error

func (*HTTPSource) StreamingAcquisition

func (h *HTTPSource) StreamingAcquisition(ctx context.Context, out chan types.Event, t *tomb.Tomb) error

func (*HTTPSource) UnmarshalConfig

func (h *HTTPSource) UnmarshalConfig(yamlConfig []byte) error

type HttpConfiguration

type HttpConfiguration struct {
	// IPFilter                       []string           `yaml:"ip_filter"`
	// ChunkSize                      *int64             `yaml:"chunk_size"`
	ListenAddr                        string             `yaml:"listen_addr"`
	ListenSocket                      string             `yaml:"listen_socket"`
	Path                              string             `yaml:"path"`
	AuthType                          string             `yaml:"auth_type"`
	BasicAuth                         *BasicAuthConfig   `yaml:"basic_auth"`
	Headers                           *map[string]string `yaml:"headers"`
	TLS                               *TLSConfig         `yaml:"tls"`
	CustomStatusCode                  *int               `yaml:"custom_status_code"`
	CustomHeaders                     *map[string]string `yaml:"custom_headers"`
	MaxBodySize                       *int64             `yaml:"max_body_size"`
	Timeout                           *time.Duration     `yaml:"timeout"`
	configuration.DataSourceCommonCfg `yaml:",inline"`
}

func (*HttpConfiguration) NewTLSConfig

func (hc *HttpConfiguration) NewTLSConfig() (*tls.Config, error)

func (*HttpConfiguration) Validate

func (hc *HttpConfiguration) Validate() error

type TLSConfig

type TLSConfig struct {
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify"`
	ServerCert         string `yaml:"server_cert"`
	ServerKey          string `yaml:"server_key"`
	CaCert             string `yaml:"ca_cert"`
}

Jump to

Keyboard shortcuts

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