httpacquisition

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 22 Imported by: 0

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 Configuration added in v1.7.4

type Configuration 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 (*Configuration) NewTLSConfig added in v1.7.4

func (c *Configuration) NewTLSConfig() (*tls.Config, error)

func (*Configuration) Validate added in v1.7.4

func (c *Configuration) Validate() error

type Source added in v1.7.4

type Source struct {
	Config Configuration

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

func (*Source) CanRun added in v1.7.4

func (*Source) CanRun() error

func (*Source) Configure added in v1.7.4

func (s *Source) Configure(_ context.Context, yamlConfig []byte, logger *log.Entry, metricsLevel metrics.AcquisitionMetricsLevel) error

func (*Source) Dump added in v1.7.4

func (s *Source) Dump() any

func (*Source) GetAggregMetrics added in v1.7.4

func (*Source) GetAggregMetrics() []prometheus.Collector

func (*Source) GetMetrics added in v1.7.4

func (*Source) GetMetrics() []prometheus.Collector

func (*Source) GetMode added in v1.7.4

func (s *Source) GetMode() string

func (*Source) GetName added in v1.7.4

func (*Source) GetName() string

func (*Source) GetUuid added in v1.7.4

func (s *Source) GetUuid() string

func (*Source) RunServer added in v1.7.4

func (s *Source) RunServer(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error

func (*Source) StreamingAcquisition added in v1.7.4

func (s *Source) StreamingAcquisition(ctx context.Context, out chan pipeline.Event, t *tomb.Tomb) error

func (*Source) UnmarshalConfig added in v1.7.4

func (s *Source) UnmarshalConfig(yamlConfig []byte) 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