core

package
v0.0.0-...-2ce8e60 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInput

func RegisterInput(name string, inFactory InputFactory)

func RegisterOutput

func RegisterOutput(name string, outFactory OutputFactory)

Types

type BoltConn

type BoltConn interface {
	Connect()
	Context() *messages.Context
	Log(msg string)
	ReadBoltMsg(meta *messages.BoltMsgMeta, contentStructs ...interface{}) (err error)
	SendAck(id string)
	SendFail(id string)
	SendSync()
	Emit(anchors []string, stream string, content ...interface{}) (taskIds []int32)
	EmitDirect(anchors []string, stream string, directTask int64, contents ...interface{})
}

BoltConn is the interface that implements the possible bolt actions

func LookupBoltConn

func LookupBoltConn(encoding string, reader io.Reader, writer io.Writer) BoltConn

func NewBoltConn

func NewBoltConn(in Input, out Output, needTaskIds bool) BoltConn

NewBoltConn returns a Storm bolt connection that a Go bolt can use to communicate with Storm

type Input

type Input interface {
	ReadMsg(msg interface{}) (err error)
	ReadTaskIds() (taskIds []int32)
	ReadBoltMsg(meta *messages.BoltMsgMeta, contentStructs ...interface{}) (err error)
}

func LookupInput

func LookupInput(encoding string, reader io.Reader) Input

type InputFactory

type InputFactory interface {
	NewInput(reader io.Reader) Input
}

type Output

type Output interface {
	SendMsg(msg interface{})
	EmitGeneric(command, id, stream, msg string, anchors []string, directTask int64, needTaskIds bool, contents ...interface{})
	Flush()
}

func LookupOutput

func LookupOutput(encoding string, writer io.Writer) Output

type OutputFactory

type OutputFactory interface {
	NewOutput(writer io.Writer) Output
}

type SpoutConn

type SpoutConn interface {
	Connect()
	Context() *messages.Context
	Log(msg string)
	ReadSpoutMsg() (command, id string, err error)
	SendSync()
	Emit(id string, stream string, contents ...interface{}) (taskIds []int32)
	EmitDirect(id string, stream string, directTask int64, contents ...interface{})
}

SpoutConn is the interface that implements the possible spout actions

func LookupSpoutConn

func LookupSpoutConn(encoding string, reader io.Reader, writer io.Writer) SpoutConn

func NewSpoutConn

func NewSpoutConn(in Input, out Output, needTaskIds bool) SpoutConn

NewSpoutConn returns a Storm spout connection that a Go spout can use to communicate with Storm

Jump to

Keyboard shortcuts

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