subscription

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(stream Stream) *Manager

func (*Manager) Run

func (m *Manager) Run(done <-chan struct{})

func (*Manager) StartTrigger

func (m *Manager) StartTrigger(input []byte) (trigger Trigger)

func (*Manager) StopTrigger

func (m *Manager) StopTrigger(trigger Trigger)

func (*Manager) TotalSubscribers

func (m *Manager) TotalSubscribers() int64

func (*Manager) TotalSubscriptions

func (m *Manager) TotalSubscriptions() int64

func (*Manager) UniqueIdentifier

func (m *Manager) UniqueIdentifier() []byte

type Stream

type Stream interface {
	Start(input []byte, next chan<- []byte, stop <-chan struct{})
	// UniqueIdentifier gives each stream a name, e.g. "kafka", "nats", "http-polling"
	// Don't give streams of the same type a different UID, e.g. don't use "kafka1", "kafka2"
	// This value should be static and the same for streams of the same kind
	UniqueIdentifier() []byte
}

type Trigger

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

func NewTrigger

func NewTrigger(subscriptionID uint64) Trigger

func (*Trigger) Next

func (h *Trigger) Next(ctx context.Context) (data []byte, ok bool)

func (*Trigger) SubscriptionID

func (h *Trigger) SubscriptionID() uint64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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