handler

package
v0.0.0-...-29f5a4c Latest Latest
Warning

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

Go to latest
Published: May 24, 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 Stream

type Stream struct {
	// Mux maps streams to data dispatchers
	Mux *mux.Mux
	// contains filtered or unexported fields
}

Stream is a data stream

func NewStream

func NewStream() (*Stream, error)

func (*Stream) Create

func (s *Stream) Create(ctx context.Context, req *pb.CreateRequest, resp *pb.CreateResponse) error

Create creates new data stream. It creates new stream dispatcher. It returns error if the requested stream id has already been registered.

func (*Stream) Publish

func (s *Stream) Publish(ctx context.Context, stream pb.Stream_PublishStream) error

Publish publishes data on stream

func (*Stream) Stop

func (s *Stream) Stop() error

func (*Stream) Subscribe

func (s *Stream) Subscribe(ctx context.Context, req *pb.SubscribeRequest, stream pb.Stream_SubscribeStream) error

Jump to

Keyboard shortcuts

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