bridge

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeGoChanBridge

func MakeGoChanBridge() (b1, b2 event.IPCBridge)

MakeGoChanBridge returns a simple testing IPCBridge made from inprocess go channels

func NewPipeBridgeClient

func NewPipeBridgeClient(inFilename, outFilename string) event.IPCBridge

NewPipeBridgeClient returns a pipe backed IPCBridge for a client

func NewPipeBridgeService

func NewPipeBridgeService(inFilename, outFilename string) event.IPCBridge

NewPipeBridgeService returns a pipe backed IPCBridge for a service

Types

type InfiniteChannel added in v0.3.0

type InfiniteChannel struct {
	// contains filtered or unexported fields
}

InfiniteChannel implements the Channel interface with an infinite buffer between the input and the output.

func (*InfiniteChannel) Close added in v0.3.0

func (ch *InfiniteChannel) Close()

Close closes the InfiniteChanel

func (*InfiniteChannel) In added in v0.3.0

func (ch *InfiniteChannel) In() chan<- interface{}

In returns the input channel

func (*InfiniteChannel) Len added in v0.3.0

func (ch *InfiniteChannel) Len() int

Len returns the length of items in queue

func (*InfiniteChannel) Out added in v0.3.0

func (ch *InfiniteChannel) Out() <-chan interface{}

Out returns the output channel

type InfiniteQueue added in v0.3.0

type InfiniteQueue struct {
	// contains filtered or unexported fields
}

InfiniteQueue represents a single instance of the queue data structure.

func (*InfiniteQueue) Add added in v0.3.0

func (q *InfiniteQueue) Add(elem interface{})

Add puts an element on the end of the queue.

func (*InfiniteQueue) Get added in v0.3.0

func (q *InfiniteQueue) Get(i int) interface{}

Get returns the element at index i in the queue. If the index is invalid, the call will panic. This method accepts both positive and negative index values. Index 0 refers to the first element, and index -1 refers to the last.

func (*InfiniteQueue) Length added in v0.3.0

func (q *InfiniteQueue) Length() int

Length returns the number of elements currently stored in the queue.

func (*InfiniteQueue) Peek added in v0.3.0

func (q *InfiniteQueue) Peek() interface{}

Peek returns the element at the head of the queue. This call panics if the queue is empty.

func (*InfiniteQueue) Remove added in v0.3.0

func (q *InfiniteQueue) Remove() interface{}

Remove removes and returns the element from the front of the queue. If the queue is empty, the call will panic.

Jump to

Keyboard shortcuts

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