stream

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidChannel = errors.New("invalid channel")

Functions

This section is empty.

Types

type ChanStream

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

ChanStream streams ticker price using channels.

func NewChanStream

func NewChanStream(t <-chan ticker.Price, errs <-chan error) (*ChanStream, error)

NewChanStream returns new ChanStream instance.

func (*ChanStream) Get

func (s *ChanStream) Get(ctx context.Context) (*ticker.Price, error)

Get returns incoming TickerPrice.

type Stream

type Stream interface {
	Get(ctx context.Context) (*ticker.Price, error)
}

Stream streams ticker price.

Jump to

Keyboard shortcuts

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