types

package
v0.0.0-...-82c3d49 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	DispatchMessageLocal(m *Message)
}

type FileListener

type FileListener struct {
	Path string `json:"path"`
}

FileListener is the data type needed to implement a listener that will write to a file in disk

type HTTPListener

type HTTPListener struct {
	TargetURL string `json:"targetURL"`
	Method    string `json:"method"`
}

HTTPListenerData is to store the information needed by a HTTP listener type So if we want to POST to "http://localhost:8000" we should store this in TargetURL and "POST" in Method parameter.

type Listener

type Listener struct {
	ID    uuid.UUID     `json:"id"`
	Ch    chan *Message `json:"-"`
	Quit  chan bool     `json:"-"`
	Topic string        `json:"topic"`
}

Listener struct must hold the information needed by any type of listener

func NewListener

func NewListener(topic *string) *Listener

type Message

type Message struct {
	Data      *[]byte
	Timestamp time.Time
	Topic     *string
}

type MessageBinding

type MessageBinding struct{}

MessageBinding implements a Gin-Gonic interface to parse bodies in http requests

func (*MessageBinding) Bind

func (mb *MessageBinding) Bind(r *http.Request, obj interface{}) error

func (*MessageBinding) Name

func (mb *MessageBinding) Name() string

type RPCListener

type RPCListener struct {
	Address string `json:"address"`
}

type TopicCreator

type TopicCreator interface {
	AddTopic(endpoint string) error
}

Jump to

Keyboard shortcuts

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