Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPublisher(f Format, newFunc NewFormatFunc)
- type ConsumerHandler
- type Format
- type FstrmPublisher
- type FstrmPublisherMarshaler
- type JsonV1Publisher
- type NewFormatFunc
- type Publisher
- func NewFstrmDNSTAPPublisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
- func NewFstrmDtapFramePublisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
- func NewJsonV1Publisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
- func NewPublisher(f Format, maxSize int, intervalSec uint, handler PublisherHandler) Publisher
- type PublisherHandler
Constants ¶
View Source
const ( DnstapFstrmControlHeaderSize = 42 DnstapFstrmMsgHeaderSize = 4 )
View Source
const DefaultFormat = "JSON/V1"
Variables ¶
View Source
var DtapFrameFSContentType = []byte("protobuf:dtap.DtapFrame")
FSContentType is the FrameStream content type for dnstap protobuf data.
Functions ¶
func RegisterPublisher ¶
func RegisterPublisher(f Format, newFunc NewFormatFunc)
Types ¶
type ConsumerHandler ¶
type Format ¶
type Format string
const FormatDNSTAP Format = "DNSTAP"
const FormatDtapFrame Format = "DTAPFrame"
const (
FormatV1JSON Format = "JSON/V1"
)
type FstrmPublisher ¶
func NewFstrmPublisher ¶
func NewFstrmPublisher(maxSize int, intervalSec uint, handler PublisherHandler) *FstrmPublisher
func (*FstrmPublisher) Close ¶
func (f *FstrmPublisher) Close() error
func (*FstrmPublisher) Publish ¶
func (f *FstrmPublisher) Publish() error
func (*FstrmPublisher) Start ¶
func (f *FstrmPublisher) Start()
func (*FstrmPublisher) Write ¶
func (f *FstrmPublisher) Write(dm *types.DnstapMessage) error
type FstrmPublisherMarshaler ¶
type FstrmPublisherMarshaler func(*types.DnstapMessage) ([]byte, error)
type JsonV1Publisher ¶
func (*JsonV1Publisher) Close ¶
func (f *JsonV1Publisher) Close() error
func (*JsonV1Publisher) Publish ¶
func (f *JsonV1Publisher) Publish() error
func (*JsonV1Publisher) Start ¶
func (f *JsonV1Publisher) Start()
func (*JsonV1Publisher) Write ¶
func (f *JsonV1Publisher) Write(dm *types.DnstapMessage) error
type NewFormatFunc ¶
type NewFormatFunc func(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
type Publisher ¶
type Publisher interface { Write(*types.DnstapMessage) error Start() Close() error Publish() error }
func NewFstrmDNSTAPPublisher ¶
func NewFstrmDNSTAPPublisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
func NewFstrmDtapFramePublisher ¶
func NewFstrmDtapFramePublisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
func NewJsonV1Publisher ¶
func NewJsonV1Publisher(maxSize int, intervalSec uint, handler PublisherHandler) Publisher
func NewPublisher ¶
func NewPublisher(f Format, maxSize int, intervalSec uint, handler PublisherHandler) Publisher
type PublisherHandler ¶
Click to show internal directories.
Click to hide internal directories.