simple

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dummy

type Dummy struct {
}

Dummy struct

func NewDummy

func NewDummy() *Dummy

NewDummy object

func (*Dummy) Close

func (e *Dummy) Close() error

Close proxy handler

func (*Dummy) Listen

func (e *Dummy) Listen() error

Listen process

func (*Dummy) Send

func (e *Dummy) Send(messages ...interface{}) (err error)

Send message

func (*Dummy) Subscribe

func (e *Dummy) Subscribe(h notificationcenter.Handler) error

Subscribe new handler

func (*Dummy) Unsubscribe

func (e *Dummy) Unsubscribe(h notificationcenter.Handler) error

Unsubscribe this handler by ptr

type EventProxy

type EventProxy struct {
	subscriber.Base
	// contains filtered or unexported fields
}

EventProxy implements basic event processor with message processing without chanel pool

func NewProxy

func NewProxy(enc ...encoder.Encoder) *EventProxy

NewProxy object with encoding option

func (*EventProxy) Close

func (e *EventProxy) Close() error

Close proxy handler

func (*EventProxy) Listen

func (e *EventProxy) Listen() error

Listen process

func (*EventProxy) Send

func (e *EventProxy) Send(msgs ...interface{}) (err error)

Send message

type Simple

type Simple struct {
	subscriber.Base
	// contains filtered or unexported fields
}

Simple provides permetive chanel implementation of message conveyer

func NewSimple

func NewSimple(enc ...encoder.Encoder) *Simple

NewSimple event processor

func (*Simple) Close

func (s *Simple) Close() error

Close simple listener

func (*Simple) Listen

func (s *Simple) Listen() error

Listen chanel and pricess messages with registered handlers

func (*Simple) Send

func (s *Simple) Send(messages ...interface{}) error

Send messages

Jump to

Keyboard shortcuts

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