Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessedFileHandler ¶
func ProcessedFileHandler(acknowledger chan transmit.Serializable, fragCollector garbage.FragmentCollector) func(socket Socket, conn net.Conn)
ProcessedFileHandler is a handler for a socket that receives processed files from the transformation step
func SendFileHandler ¶
func SendFileHandler(fragCollector garbage.FragmentCollector) func(socket Socket, conn net.Conn)
SendFileHandler is a handler function for a socket that sends files to the transformation step
Types ¶
type ConnHandler ¶
ConnHandler is a handler function ran in a goroutine upon a socket accepting a new connection
type Pipe ¶
type Pipe struct { SocketFrom Socket SocketTo Socket FromTarget chan transmit.Serializable ToTarget chan transmit.Serializable }
Pipe represents a bidirectional connection between an iterum sidecar and transformation step ToTarget and FromTarget refer to the channels in the two sockets Messages supposed to go towards Target can be put on ToTarget and message from the Target are put on FromTarget
func NewPipe ¶
func NewPipe(fromFile, toFile string, fromChannel, toChannel chan transmit.Serializable, fromHandler, toHandler ConnHandler) Pipe
NewPipe creates and initiates a new Pipe
type Socket ¶
type Socket struct { Listener net.Listener Channel chan transmit.Serializable // contains filtered or unexported fields }
Socket is a structure holding a listener, accepting connections Channel is a channel that external things can post messages on take from that are supposed to be sent to or from the connections
func NewSocket ¶
func NewSocket(socketPath string, channel chan transmit.Serializable, handler ConnHandler) (socket Socket, err error)
NewSocket sets up a listener at the given socketPath and links the passed channel with the given bufferSize. It returns an error on failure
func (Socket) StartBlocking ¶
func (socket Socket) StartBlocking()
StartBlocking enters an endless loop accepting connections and calling the handler function in a goroutine