zmq_connector

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

README

HyperStreams Zmq Connector Library

Library

Documentation

Index

Constants

View Source
const FirstFrame = 15
View Source
const StreamError = 13

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCodes

type ErrorCodes uint8
const (
	EndpointStreamNotFound ErrorCodes = iota
)

func (ErrorCodes) String

func (r ErrorCodes) String() string

type HsMassage

type HsMassage struct {
	State    uint8
	Function uint8
	Body     []byte
}

type HsSever

type HsSever struct {
	SocketUrl string
	Streams   Streams
	// contains filtered or unexported fields
}

func (*HsSever) StartServer

func (h *HsSever) StartServer()

type HsTemplate

type HsTemplate struct {
	Pf ProcessingFunction
}

func (*HsTemplate) Init

func (ht *HsTemplate) Init()

func (*HsTemplate) StreamProcessor

func (ht *HsTemplate) StreamProcessor(
	stream *StreamConfig,
	cancel context.CancelFunc,
)

type ProcessingFunction

type ProcessingFunction func(message []byte, functionId uint8) []byte

type SocketMassage

type SocketMassage struct {
	Body    []byte
	Address []byte
}

type StreamConfig

type StreamConfig struct {
	Input  chan *HsMassage
	Output chan *HsMassage
	// contains filtered or unexported fields
}

type StreamProcessor

type StreamProcessor func(
	stream *StreamConfig,
	cancel context.CancelFunc,
)

type Streams

type Streams interface {
	// contains filtered or unexported methods
}

type StreamsHolder

type StreamsHolder struct {
	Streams        map[uint32]*StreamConfig
	Input          chan *SocketMassage
	Output         chan *SocketMassage
	MessageHandler StreamProcessor
	Meta           []byte
}

func (*StreamsHolder) ErrorResponse

func (h *StreamsHolder) ErrorResponse(stream uint32, function uint8, Address []byte, errorCode ErrorCodes)

func (*StreamsHolder) InputProcessing

func (h *StreamsHolder) InputProcessing(ctx context.Context)

Jump to

Keyboard shortcuts

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