cat

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHAN_SLACK              = 8000 // Up to this many messages / sec
	MetricsCheckDuration    = 60 * time.Second
	CacheInvalidateDuration = 8 * time.Hour
	MDB_NO_LOCK             = 0x400000
	MDB_PERMS               = 0666
)

Setting this decode limit explicitly so that we know what it is. By default at the time of this writing the library would have used 64MiB. Feel free to change if appropriate.

View Source
const (
	HttpHealthCheckPath         = "/check"
	HttpAlertInboundPath        = "/chf"
	HttpCompanyID               = "sid"
	HttpAlertKey                = "key"
	MaxProxyListenerBufferAlloc = 10 * 1024 * 1024 // 10MB
	MSG_KEY_PREFIX              = 80
	HttpSenderID                = "sender_id"
	APP_PROTOCOL_COL            = "app_protocol"
	UDR_TYPE_INT                = "int"
	UDR_TYPE_BIGINT             = "bigint"
	UDR_TYPE_STRING             = "string"
	UDR_TYPE                    = "application_type"
)

Variables

View Source
var (
	DEFAULT_GEO        = []byte("--")
	DEFAULT_GEO_PACKED = patricia.PackGeo(DEFAULT_GEO)
)
View Source
var (
	RollupsSendDuration = 15 * time.Second
)

Functions

This section is empty.

Types

type Config added in v1.0.0

type Config struct {
	Listen            string
	SslCertFile       string
	SslKeyFile        string
	MappingFile       string
	Threads           int
	ThreadsInput      int
	MaxThreads        int
	Format            formats.Format
	FormatRollup      formats.Format
	Compression       kt.Compression
	MaxFlowPerMessage int
	RollupAndAlpha    bool
	UDRFile           string
	GeoMapping        string
	AsnMapping        string
	DnsResolver       string
	SampleRate        uint32
	MaxBeforeSample   int
	Auth              *auth.AuthConfig
	SNMPFile          string
	SNMPDisco         bool
	TagMapType        maps.Mapper
	Kentik            *kt.KentikConfig
	VpcSource         vpc.CloudSource
	FlowSource        flow.FlowSource
	SyslogSource      string
	LogTee            chan string
	MetricsChan       chan []*kt.JCHF
	AppMap            string
	HttpInput         bool
	Enricher          string
}

Config configuration parameters used by activate service

type CustomMapper

type CustomMapper struct {
	Customs map[uint32]string `json:"customs"`
}

func NewCustomMapper

func NewCustomMapper(file string) (*CustomMapper, error)

type Flow

type Flow struct {
	CompanyId int
	CHF       model.CHF
}

type KKCMetric

type KKCMetric struct {
	Flows          go_metrics.Meter
	FlowsOut       go_metrics.Meter
	DroppedFlows   go_metrics.Meter
	Errors         go_metrics.Meter
	AlphaQ         go_metrics.Gauge
	JCHFQ          go_metrics.Gauge
	AlphaQDrop     go_metrics.Meter
	InputQ         go_metrics.Meter
	InputQLen      go_metrics.Gauge
	OutputQLen     go_metrics.Gauge
	SnmpDeviceData *kt.SnmpMetricSet
}

type KTranslate

type KTranslate struct {
	// contains filtered or unexported fields
}

func NewKTranslate

func NewKTranslate(config *Config, log logger.ContextL, registry go_metrics.Registry, version string, sinks string, serviceName string) (*KTranslate, error)

func (*KTranslate) GetStatus

func (kc *KTranslate) GetStatus() []byte

GetStatus implements the baseserver.Service interface.

func (*KTranslate) HttpInfo

func (kc *KTranslate) HttpInfo(w http.ResponseWriter, r *http.Request)

HttpInfo implements the baseserver.Service interface.

func (*KTranslate) Init

func (kc *KTranslate) Init(env svc.Environment) error

These are needed in case we are running under windows.

func (*KTranslate) Run

func (kc *KTranslate) Run(ctx context.Context) error

func (*KTranslate) RunHealthCheck

func (kc *KTranslate) RunHealthCheck(ctx context.Context, result *baseserver.HealthCheckResult)

RunHealthCheck implements the baseserver.Service interface.

func (*KTranslate) Start

func (kc *KTranslate) Start() error

func (*KTranslate) Stop

func (kc *KTranslate) Stop() error

type UDR

type UDR struct {
	ColumnName      string
	ApplicationName string
	Type            string
}

type UDRMapper

type UDRMapper struct {
	UDRs     map[int32]map[string]*UDR
	Subtypes map[string]map[string]*UDR
}

func NewUDRMapper

func NewUDRMapper(file string) (*UDRMapper, int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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