nsqproxy

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package nsqproxy translates HTTP calls into NSQ messages.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidTopicName = errors.New("Invalid topic name")

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Publisher

	Topic string
}

func New

func New(target string) (h Handler, err error)

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(wr http.ResponseWriter, req *http.Request)

type Message

type Message struct {
	Url  string `json:"url"`
	Body []byte `json:"body"`
}

type Publisher

type Publisher interface {
	Publish(topic string, body []byte) error
	Stop()
	String() string
}

Jump to

Keyboard shortcuts

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