messages

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: AGPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const EventMessageName = "event/v0"
View Source
const PriceMessageName = "price/v0"

Variables

View Source
var ErrPriceMalformedMessage = errors.New("malformed price message")

Functions

This section is empty.

Types

type Event

type Event struct {
	// Type of the event.
	Type string
	// Unique ID of the event.
	ID []byte
	// Event index used to search for events.
	Index []byte
	// The date when the event message was created. It is *not* the date of
	// the event itself.
	Date time.Time
	// List of event data.
	Data map[string][]byte
	// List of event signatures.
	Signatures map[string][]byte
}

func (*Event) MarshallBinary

func (e *Event) MarshallBinary() ([]byte, error)

MarshallBinary implements the transport.Message interface.

func (*Event) UnmarshallBinary

func (e *Event) UnmarshallBinary(data []byte) error

UnmarshallBinary implements the transport.Message interface.

type Price

type Price struct {
	Price *oracle.Price   `json:"price"`
	Trace json.RawMessage `json:"trace"`
}

func (*Price) Marshall

func (p *Price) Marshall() ([]byte, error)

func (*Price) MarshallBinary

func (p *Price) MarshallBinary() ([]byte, error)

MarshallBinary implements the transport.Message interface.

func (*Price) Unmarshall

func (p *Price) Unmarshall(b []byte) error

func (*Price) UnmarshallBinary

func (p *Price) UnmarshallBinary(data []byte) error

UnmarshallBinary implements the transport.Message interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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