rtq

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2018 License: MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQ

func NewQ(name string, cfg Config) (*rtQ, error)

NewQ returns a new rtQ

func RxRouteHandler added in v1.1.1

func RxRouteHandler(c *gin.Context)

RxRouteHandler handles the http route for inbound data

Types

type Config

type Config struct {
	Interval   time.Duration
	Batch      int
	MaxInQueue int
	Logger     *zap.Logger
	Receiver   string
	Path       string
}

Config options for rxtx

type Message

type Message struct {
	Seq      string                 `json:"seq"`
	Time     time.Time              `json:"time"`
	Uuid     string                 `json:"uuid"`
	Producer string                 `json:"producer"`
	Label    string                 `json:"label"`
	Key      string                 `json:"key"`
	Payload  map[string]interface{} `json:"payload"`
}

Message to store and send

type MessageBatch

type MessageBatch struct {
	Uuid     string    `json:"uuid"`
	Size     int       `json:"size"`
	Messages []Message `json:"messages"`
}

MessageBatch Holds a batch of Messages for the server

Jump to

Keyboard shortcuts

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