pushers

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: 4 Imported by: 2

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 Range

func Range(fn func(string))

func WithConfig

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

Types

type BusChannel

type BusChannel struct {
}

func NewBusChannel

func NewBusChannel() *BusChannel

func (*BusChannel) Send

func (bc *BusChannel) Send(evt event.Event)

type Channel

type Channel interface {
	Send(event.Event)
}

Channel defines a interface which exposes a single method for delivering PushMessages to a giving underline service.

func Dummy

func Dummy(...func(Channel) error) (Channel, error)

func FilterChannel

func FilterChannel(channel Channel, fn FilterFunc) Channel

FilterChannel defines a struct which handles the delivery of giving messages to a specific sets of backend channels based on specific criteria.

func MustDummy

func MustDummy(...func(Channel) error) Channel

func TokenChannel

func TokenChannel(channel Channel, token string) Channel

TokenChannel returns a Channel to set token value.

type ChannelFunc

type ChannelFunc func(...func(Channel) error) (Channel, error)

func Get

func Get(key string) (ChannelFunc, bool)

func Register

func Register(key string, fn ChannelFunc) ChannelFunc

type Filter

type Filter interface {
	Filter(event.Event) bool
}

Filter defines an interface which exposes a method for filtering specific messages by specific boundaries.

type FilterFunc

type FilterFunc func(event.Event) bool

FilterFunc defines a function for event filtering.

func RegexFilterFunc

func RegexFilterFunc(field string, expressions []string) FilterFunc

RegexFilterFunc returns a function for filtering event values.

type TomlDecoder

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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