Versions in this module Expand all Collapse all v3 v3.7.3 Apr 29, 2020 Changes in this version + const DefaultBufferSize + var Definitions = make(map[string]string) + var IncludeCaller bool + func ContextWithCorrelationID(ctx context.Context, cids ...string) context.Context + func CorrelationIDsFromContext(ctx context.Context) []string + func DefineFunc(name, description string, visibility ...ttnpb.Right) func() Definition + func NewCorrelationID() string + func Proto(e Event) (*ttnpb.Event, error) + func Publish(evts ...Event) + func PublishEvent(ctx context.Context, name string, identifiers CombinedIdentifiers, ...) + func RegisterContextMarshaler(name string, m ContextMarshaler) + func SetDefaultPubSub(ps PubSub) + func StreamServerInterceptor(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, ...) error + func Subscribe(name string, hdl Handler) error + func UnaryServerInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error) + func Unsubscribe(name string, hdl Handler) + type Channel chan Event + func (ch Channel) Notify(evt Event) + func (ch Channel) ReceiveContext(ctx context.Context) Event + func (ch Channel) ReceiveTimeout(timeout time.Duration) Event + type CombinedIdentifiers interface + CombinedIdentifiers func() *ttnpb.CombinedIdentifiers + type ContextMarshaler interface + MarshalContext func(context.Context) []byte + UnmarshalContext func(context.Context, []byte) (context.Context, error) + type Definition func(ctx context.Context, ids CombinedIdentifiers, data interface{}) Event + func (d Definition) BindData(data interface{}) DefinitionDataClosure + func Define(name, description string, visibility ...ttnpb.Right) Definition + type DefinitionDataClosure func(ctx context.Context, ids CombinedIdentifiers) Event + type Event interface + Caller func() string + Context func() context.Context + CorrelationIDs func() []string + Data func() interface{} + Identifiers func() []*ttnpb.EntityIdentifiers + Name func() string + Origin func() string + Time func() time.Time + Visibility func() *ttnpb.Rights + func ApplyDefinitionDataClosures(ctx context.Context, ids CombinedIdentifiers, ...) []Event + func FromProto(pb *ttnpb.Event) (Event, error) + func New(ctx context.Context, name string, identifiers CombinedIdentifiers, ...) Event + func UnmarshalJSON(data []byte) (Event, error) + type Handler interface + Notify func(Event) + func ContextHandler(ctx context.Context, handler Handler) Handler + func HandlerFunc(handler func(Event)) Handler + type IdentifierFilter interface + Subscribe func(ctx context.Context, ids CombinedIdentifiers, handler Handler) + Unsubscribe func(ctx context.Context, ids CombinedIdentifiers, handler Handler) + func NewIdentifierFilter() IdentifierFilter + type PubSub interface + func DefaultPubSub() PubSub + func NewPubSub(bufSize uint) PubSub + type Publisher interface + Publish func(evt Event) + type Subscriber interface + Subscribe func(name string, hdl Handler) error + Unsubscribe func(name string, hdl Handler)