producer

package
v1.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddEventType

func AddEventType(eventType pb.EventType) error

AddEventType supported event

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 CreateChaincodeEvent

func CreateChaincodeEvent(te *pb.ChaincodeEvent) *pb.Event

CreateChaincodeEvent creates a Event from a ChaincodeEvent

func CreateFilteredBlockEvent added in v1.1.0

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

CreateFilteredBlockEvent creates a Event from a FilteredBlock

func CreateRejectionEvent

func CreateRejectionEvent(tx *pb.Transaction, errorMsg string) *pb.Event

CreateRejectionEvent creates an Event from TxResults

func Send

func Send(e *pb.Event) error

Send sends the event to interested consumers

Types

type EventsServer

type EventsServer struct {
}

EventsServer implementation of the Peer service

func NewEventsServer

func NewEventsServer(config *EventsServerConfig) *EventsServer

NewEventsServer returns a EventsServer

func (*EventsServer) Chat

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

Chat implementation of the Chat bidi streaming RPC function

type EventsServerConfig added in v1.1.0

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

EventsServerConfig contains the setup config for the events server

Jump to

Keyboard shortcuts

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