events

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2017 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Name string      `json:"name"`
	Data interface{} `json:"data"`
}

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

func NewStream

func NewStream(size int) *Stream

func (*Stream) Send

func (s *Stream) Send(evt *Event)

func (*Stream) Start added in v0.1.2

func (s *Stream) Start(ctx context.Context)

func (*Stream) Subscribe added in v0.1.2

func (s *Stream) Subscribe() (string, <-chan *Event)

func (*Stream) Unsubscribe added in v0.1.2

func (s *Stream) Unsubscribe(id string)

Jump to

Keyboard shortcuts

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