interceptors

package
v1.0.64 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiDataInterceptor

type MultiDataInterceptor struct {
	// contains filtered or unexported fields
}

MultiDataInterceptor is used for intercepting packed multi data

func NewMultiDataInterceptor

func NewMultiDataInterceptor(
	marshalizer marshal.Marshalizer,
	factory process.InterceptedDataFactory,
	processor process.InterceptorProcessor,
	throttler process.InterceptorThrottler,
) (*MultiDataInterceptor, error)

NewMultiDataInterceptor hooks a new interceptor for packed multi data

func (*MultiDataInterceptor) IsInterfaceNil

func (mdi *MultiDataInterceptor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MultiDataInterceptor) ProcessReceivedMessage

func (mdi *MultiDataInterceptor) ProcessReceivedMessage(message p2p.MessageP2P, broadcastHandler func(buffToSend []byte)) error

ProcessReceivedMessage is the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to)

type SingleDataInterceptor

type SingleDataInterceptor struct {
	// contains filtered or unexported fields
}

SingleDataInterceptor is used for intercepting packed multi data

func NewSingleDataInterceptor

func NewSingleDataInterceptor(
	factory process.InterceptedDataFactory,
	processor process.InterceptorProcessor,
	throttler process.InterceptorThrottler,
) (*SingleDataInterceptor, error)

NewSingleDataInterceptor hooks a new interceptor for single data

func (*SingleDataInterceptor) IsInterfaceNil

func (sdi *SingleDataInterceptor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SingleDataInterceptor) ProcessReceivedMessage

func (sdi *SingleDataInterceptor) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) error

ProcessReceivedMessage is the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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