types

package
v2.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

* 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. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var File_dtap_frame_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	Writer
	Reader
}

type Counter

type Counter interface {
	Inc()
}

type DnstapMessage

type DnstapMessage struct {

	// for dnstap.Extra
	Labels map[string]string
	// contains filtered or unexported fields
}

func NewDnstapMessage

func NewDnstapMessage(raw []byte) (*DnstapMessage, error)

func NewDnstapMessageFromDnstap

func NewDnstapMessageFromDnstap(dt *dnstap.Dnstap) (*DnstapMessage, error)

func NewDnstapMessageFromDtapFrame

func NewDnstapMessageFromDtapFrame(f *DtapFrame) (*DnstapMessage, error)

func NewDnstapMessageFromDtapFrameRaw

func NewDnstapMessageFromDtapFrameRaw(raw []byte) (*DnstapMessage, error)

func (*DnstapMessage) ConvertV1Flat

func (d *DnstapMessage) ConvertV1Flat() (*dnstapV1Flat, error)

func (*DnstapMessage) ConvertV1JSON

func (d *DnstapMessage) ConvertV1JSON() ([]byte, error)

func (*DnstapMessage) ConvertV1MapString

func (d *DnstapMessage) ConvertV1MapString() (map[string]interface{}, error)

func (*DnstapMessage) DeepCopy

func (d *DnstapMessage) DeepCopy() *DnstapMessage

func (*DnstapMessage) GetDnstap

func (d *DnstapMessage) GetDnstap() *dnstap.Dnstap

func (*DnstapMessage) GetMessage

func (d *DnstapMessage) GetMessage() *dns.Msg

func (*DnstapMessage) GetRaw

func (d *DnstapMessage) GetRaw() []byte

func (*DnstapMessage) ToDtapFrame

func (d *DnstapMessage) ToDtapFrame() *DtapFrame

func (*DnstapMessage) UpdateFromDnstap

func (d *DnstapMessage) UpdateFromDnstap(dt *dnstap.Dnstap) error

type DnstapMessageGetFunc

type DnstapMessageGetFunc func(*DnstapMessage) string

type DtapFrame

type DtapFrame struct {
	Dnstap *golang_dnstap.Dnstap `protobuf:"bytes,1,req,name=Dnstap" json:"Dnstap,omitempty"`
	Labels map[string]string     `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

for DTAP output plguins

func (*DtapFrame) Descriptor deprecated

func (*DtapFrame) Descriptor() ([]byte, []int)

Deprecated: Use DtapFrame.ProtoReflect.Descriptor instead.

func (*DtapFrame) GetDnstap

func (x *DtapFrame) GetDnstap() *golang_dnstap.Dnstap

func (*DtapFrame) GetLabels

func (x *DtapFrame) GetLabels() map[string]string

func (*DtapFrame) ProtoMessage

func (*DtapFrame) ProtoMessage()

func (*DtapFrame) ProtoReflect

func (x *DtapFrame) ProtoReflect() protoreflect.Message

func (*DtapFrame) Reset

func (x *DtapFrame) Reset()

func (*DtapFrame) String

func (x *DtapFrame) String() string

type FilterPlugin

type FilterPlugin interface {
	Plugin
	Filter(*DnstapMessage) *DnstapMessage
}

type InputPlugin

type InputPlugin interface {
	Plugin
	Start(context.Context, Writer) error
}

type Net

type Net struct {
	IP           net.IP
	PrefixLength int
}

func (Net) MarshalJSON

func (n Net) MarshalJSON() ([]byte, error)

func (*Net) String

func (n *Net) String() string

func (*Net) UnmarshalJSON

func (n *Net) UnmarshalJSON(b []byte) error

type OutputPlugin

type OutputPlugin interface {
	Plugin
	Start(context.Context, Reader) error
}

type Plugin

type Plugin interface {
	GetName() string
}

type Reader

type Reader interface {
	Read() <-chan *DnstapMessage
}

type Writer

type Writer interface {
	Write(*DnstapMessage)
}

Jump to

Keyboard shortcuts

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