stream

package
v0.0.0-...-6c03f8d Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

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

Message is a message on the event stream

func (*Message) Body

func (m *Message) Body() []byte

func (*Message) ChainID

func (m *Message) ChainID() ids.ID

func (*Message) ID

func (m *Message) ID() ids.ID

func (*Message) Timestamp

func (m *Message) Timestamp() uint64

type Processor

type Processor interface {
	ProcessNextMessage() (*Message, error)
	Close() error
}

Processor handles writing and reading to/from the event stream

func NewConsumer

func NewConsumer(conf cfg.ClientConfig, networkID uint32, chainID ids.ID) (Processor, error)

NewConsumer creates a consumer for the given config

func NewProducer

func NewProducer(conf cfg.ClientConfig, _ uint32, chainID ids.ID) (Processor, error)

NewProducer creates a producer using the given config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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