Documentation
¶
Overview ¶
Package eventchannel contains functionality for sending any protobuf message on a socketpair.
The wire format is a uvarint length followed by a binary protobuf.Any message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Emitter ¶
type Emitter interface {
// Emit writes a single eventchannel message to an emitter. Emit should
// return hangup = true to indicate an emitter has "hung up" and no further
// messages should be directed to it.
Emit(msg proto.Message) (hangup bool, err error)
// Close closes this emitter. Emit cannot be used after Close is called.
Close() error
}
Emitter emits a proto message.
func DebugEmitterFrom ¶
DebugEmitterFrom creates a new event channel emitter by wraping an existing raw emitter.
func SocketEmitter ¶
SocketEmitter creates a new event channel based on the given fd.
SocketEmitter takes ownership of fd.
Click to show internal directories.
Click to hide internal directories.