input

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFormat = "DNSTAP"

Variables

View Source
var (
	TotalDecordError = promauto.NewCounter(prometheus.CounterOpts{
		Name: "dtap_input_error_frame_total",
		Help: "The total number of input error frames",
	})
)

Functions

func RegisterFormat

func RegisterFormat(f Format, newFunc NewFormatFunc)

Types

type Format

type Format string

The file format can be either "DNSTAP" or "DTAPFrame". "DNSTAP" is the normal DNSTAP format. "DTAPFrame" is a DNSTAP format with a label added. For details, https://github.com/mimuret/dtap/blob/v2/proto/dtap_frame.proto.

const FormatDNSTAP Format = "DNSTAP"
const FormatDtapFrame Format = "DtapFrame"

type FstrmUnmarshaler

type FstrmUnmarshaler func([]byte) (*types.DnstapMessage, error)

type InputServer

type InputServer struct {
	DecoderOptions *framestream.DecoderOptions
	// contains filtered or unexported fields
}

func NewDnstapInputServer

func NewDnstapInputServer(options *framestream.DecoderOptions, ic *types.InputContext) *InputServer

func NewDtapFrameInputServer

func NewDtapFrameInputServer(options *framestream.DecoderOptions, ic *types.InputContext) *InputServer

func NewInputServer

func NewInputServer(f Format, options *framestream.DecoderOptions, ic *types.InputContext) *InputServer

func (*InputServer) Read

func (i *InputServer) Read(r io.Reader, buf types.Writer) error

func (*InputServer) Serve

func (i *InputServer) Serve(ln net.Listener, buf types.Writer) error

type NewFormatFunc

type NewFormatFunc func(options *framestream.DecoderOptions, ic *types.InputContext) *InputServer

Directories

Path Synopsis
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

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