listener

package
v0.0.0-...-05965fc Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Overview

Copyright 2016-2019 DutchSec (https://dutchsec.com/)

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.

Copyright 2016-2019 DutchSec (https://dutchsec.com/)

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.

Copyright 2016-2019 DutchSec (https://dutchsec.com/)

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.

Copyright 2016-2019 DutchSec (https://dutchsec.com/)

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

This section is empty.

Functions

func Get

func Get(key string) (func(...func(Listener) error) (Listener, error), bool)

func Range

func Range(fn func(string))

func Register

func Register(key string, fn func(...func(Listener) error) (Listener, error)) func(...func(Listener) error) (Listener, error)

func WithAddress

func WithAddress(protocol, address string) func(Listener) error

func WithChannel

func WithChannel(channel pushers.Channel) func(Listener) error

func WithConfig

func WithConfig(c toml.Primitive, decoder TomlDecoder) func(Listener) error

Types

type AddAddresser

type AddAddresser interface {
	AddAddress(net.Addr)
}

type DummyUDPConn

type DummyUDPConn struct {
	Buffer []byte

	Laddr net.Addr
	Raddr *net.UDPAddr

	Fn func(b []byte, addr *net.UDPAddr) (int, error)
}

func (*DummyUDPConn) Close

func (dc *DummyUDPConn) Close() error

func (*DummyUDPConn) LocalAddr

func (dc *DummyUDPConn) LocalAddr() net.Addr

func (*DummyUDPConn) Read

func (dc *DummyUDPConn) Read(b []byte) (int, error)

func (*DummyUDPConn) RemoteAddr

func (dc *DummyUDPConn) RemoteAddr() net.Addr

func (*DummyUDPConn) SetDeadline

func (dc *DummyUDPConn) SetDeadline(t time.Time) error

func (*DummyUDPConn) SetReadDeadline

func (dc *DummyUDPConn) SetReadDeadline(t time.Time) error

func (*DummyUDPConn) SetWriteDeadline

func (dc *DummyUDPConn) SetWriteDeadline(t time.Time) error

func (*DummyUDPConn) Write

func (dc *DummyUDPConn) Write(b []byte) (int, error)

type Listener

type Listener interface {
	Start(ctx context.Context) error
	Accept() (net.Conn, error)
}

func Dummy

func Dummy(options ...func(Listener) error) (Listener, error)

func MustDummy

func MustDummy(options ...func(Listener) error) Listener

type SetChanneler

type SetChanneler interface {
	SetChannel(pushers.Channel)
}

type TomlDecoder

type TomlDecoder interface {
	PrimitiveDecode(primValue toml.Primitive, v interface{}) error
}

Directories

Path Synopsis
arp
tcp
udp

Jump to

Keyboard shortcuts

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