client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Write

func Write(client Client, writer Writer, msg message.Msg) error

Write encapsulates the function of determining which function to call based on the msg.OP() and also wraps the function call with a Session.

Types

type Client

type Client interface {
	Connect() (Session, error)
}

Client provides a standard interface for interacting with the underlying sources/sinks.

type Closer added in v0.2.0

type Closer interface {
	Close()
}

Closer provides a standard interface for closing a client or session

type MessageChanFunc

type MessageChanFunc func(Session, chan struct{}) (chan message.Msg, error)

MessageChanFunc represents the func signature needed to send messages to downstream adaptors.

type NsFilterFunc

type NsFilterFunc func(string) bool

NsFilterFunc represents the func signature needed to filter while Read()ing.

type Reader

type Reader interface {
	Read(NsFilterFunc) MessageChanFunc
}

Reader represents the ability to send messages down the pipe and is only needed for adaptors acting as a Source node.

type Session

type Session interface {
}

Session represents the connection to the underlying service.

type Writer

type Writer interface {
	Write(message.Msg) func(Session) error
}

Writer represents all possible functions needing to be implemented to handle messages.

Jump to

Keyboard shortcuts

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