service

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultChannelBuffer = 100
View Source
const (
	DefaultSubscriptionChannelChannelDepth = 10
)

Variables

View Source
var (
	DuplicateSubscriberError = errors.New("duplicate subscriber")
	NoWritersError           = errors.New("no writers defined")
	NoReadersError           = errors.New("no readers defined")
)

Functions

This section is empty.

Types

type Broadcaster

type Broadcaster struct {
	FigiName    map[string]string
	FigiChannel map[string]string

	Cord    chan model.Update
	Readers []reader.StocksReader
	Writers []writer.StocksWriter
	// contains filtered or unexported fields
}

func (*Broadcaster) Broadcast

func (b *Broadcaster) Broadcast(upd model.Update) (subscribersNotified int)

func (*Broadcaster) Close

func (b *Broadcaster) Close(ctx context.Context) (err error)

func (*Broadcaster) Ping

func (b *Broadcaster) Ping(ctx context.Context) (err error)

func (*Broadcaster) Start

func (b *Broadcaster) Start(ctx context.Context) (err error)

func (*Broadcaster) StartWriters

func (b *Broadcaster) StartWriters(ctx context.Context) (err error)

func (*Broadcaster) Subscribe

func (b *Broadcaster) Subscribe(ctx context.Context, name string) (chan model.Update, error)

Jump to

Keyboard shortcuts

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