producer

package
v1.2.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2018 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 added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

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 added in v1.2.0

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