config

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateHttpServerConfig

func ValidateHttpServerConfig(conf *HttpServiceConf, serviceName string)

func ValidateKafkaConsumerServiceConfig

func ValidateKafkaConsumerServiceConfig(conf *KafkaConsumerServiceConf, serviceName string)

func ValidateKafkaProducerConfig

func ValidateKafkaProducerConfig(conf *KafkaProducerConf, serviceName string)

func ValidatePcapServerConfig added in v1.1.3

func ValidatePcapServerConfig(conf *PcapServiceConf, serviceName string)

func ValidateStatServerConfig

func ValidateStatServerConfig(conf *StatServiceConf, serviceName string)

func ValidateUdpServerConfig

func ValidateUdpServerConfig(conf *UdpServiceConf, serviceName string)

Types

type HttpServiceConf

type HttpServiceConf struct {
	Listen         string   `json:"listen"`
	Path           string   `json:"path"`
	Base64Body     bool     `json:"base64_encode_body,omitempty"`
	UseJSON        bool     `json:"use_json,omitempty"`
	AllowedHeaders []string `json:"allowed_headers,omitempty"`
}

type KafkaConsumerServiceConf

type KafkaConsumerServiceConf struct {
	Brokers    string   `json:"brokers"`
	Topic      string   `json:"topic"`
	Options    []string `json:"options,omitempty"`
	Group      string   `json:"group"`
	Base64Body bool     `json:"base64_encode_body"`
}

type KafkaProducerConf

type KafkaProducerConf struct {
	Brokers        string            `json:"brokers"`
	Topic          string            `json:"topic"`
	Options        []string          `json:"options,omitempty"`
	SetHeaders     map[string]string `json:"set_headers,omitempty"`
	QueueBufferLen uint              `json:"queue_buffer_len"`
}

type PcapServiceConf added in v1.1.3

type PcapServiceConf struct {
	Device          string `json:"device"`
	SnapLen         uint32 `json:"snap_len"`
	Expression      string `json:"filter"`
	Base64Body      bool   `json:"base64_encode_body,omitempty"`
	SrcIpHeaderName string `json:"source_ip_header,omitempty"`
}

type ServiceConf

type ServiceConf struct {
	Type string `json:"type"`
	Name string `json:"name"`

	HttpService          HttpServiceConf          `json:"http_options"`
	UdpService           UdpServiceConf           `json:"udp_options"`
	PcapService          PcapServiceConf          `json:"pcap_options"`
	KafkaConsumerService KafkaConsumerServiceConf `json:"kafka_consumer_options"`

	KafkaProducer KafkaProducerConf `json:"kafka_producer"`
}

type ServiceList

type ServiceList struct {
	Services []ServiceConf   `json:"services"`
	Stat     StatServiceConf `json:"stat"`
}

type StatServiceConf

type StatServiceConf struct {
	Listen      string `json:"listen,omitempty"`
	JsonPath    string `json:"json_path,omitempty"`
	MetricsPath string `json:"metrics_path,omitempty"`
}

type UdpServiceConf

type UdpServiceConf struct {
	Listen          string            `json:"listen"`
	Base64Body      bool              `json:"base64_encode_body,omitempty"`
	SignatureBytes  map[string]string `json:"signature_bytes,omitempty"`
	Workers         uint              `json:"workers,omitempty"`
	MaxPacketSize   uint32            `json:"max_packet_size,omitempty"`
	SrcIpHeaderName string            `json:"source_ip_header,omitempty"`
}

Jump to

Keyboard shortcuts

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