exchange

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExchangeNotRegistered = errors.New("exchange not registered")

Functions

func ListNames

func ListNames() []string

func Register

func Register(name string, x Exchange)

Types

type Exchange

type Exchange interface {
	// Subscribe subscribes to one or more symbols with a given set of callbacks
	Subscribe(context.Context, Subscriber, ...string) error
}

func Get

func Get(name string) (Exchange, error)

func MustGet

func MustGet(name string) Exchange

type Subscriber

type Subscriber interface {
	OnSnapshot(string, *obm.Update) error
	OnUpdate(string, *obm.Update) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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