core

package
v0.0.0-...-c2b32c5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(topic string, message []byte) error

Stores the message on disk then publishes message to all open gates

Types

type InputError

type InputError struct {
	Msg string
}

func (InputError) Error

func (e InputError) Error() string

type Subscriber

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

func NewSub

func NewSub(topic string, group string) (*Subscriber, error)

func (Subscriber) String

func (s Subscriber) String() string

func (*Subscriber) Subscribe

func (s *Subscriber) Subscribe(ctx context.Context, handler func([]byte) error) error

Invokes handler on every new message. Blocks until context is canceled.

Directories

Path Synopsis
offset
record

Jump to

Keyboard shortcuts

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