producer

package
v0.0.0-...-6f64d5f Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlockEvent

func CreateBlockEvent(te *common.Block) *pb.Event

CreateBlockEvent creates a Event from a Block

func CreateBlockEvents

func CreateBlockEvents(block *common.Block) (bevent *pb.Event, fbevent *pb.Event, channelID string, err error)

CreateBlockEvents creates block events for a block. It removes the RW set and creates a block event and a filtered block event. Sending the events is the responsibility of the code that calls this function.

func CreateFilteredBlockEvent

func CreateFilteredBlockEvent(te *pb.FilteredBlock) *pb.Event

CreateFilteredBlockEvent creates a Event from a FilteredBlock

func Send

func Send(e *pb.Event) error

Send sends the event to the global event processor's buffered channel

Types

type EventsServer

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

EventsServer implementation of the Peer service

func NewEventsServer

func NewEventsServer(config *EventsServerConfig) *EventsServer

NewEventsServer returns an EventsServer

func (*EventsServer) Chat

func (e *EventsServer) Chat(stream pb.Events_ChatServer) error

type EventsServerConfig

type EventsServerConfig struct {
	BufferSize       uint
	Timeout          time.Duration
	SendTimeout      time.Duration
	TimeWindow       time.Duration
	BindingInspector comm.BindingInspector
}

EventsServerConfig contains the setup config for the events server

type Set

type Set map[*handler]struct{}

Set is a set of handlers

Jump to

Keyboard shortcuts

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