server

package
v0.0.0-...-9dd540f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MineConstant = "CONSTANT"

MineConstant is the value tha is returned for constant emitters

Variables

This section is empty.

Functions

func Run

func Run(url string)

Run starts the Pipeline Server

Types

type Agent

type Agent struct {
	ID string
	// contains filtered or unexported fields
}

An Agent is an in memory representation of the state of an external agent program

func (*Agent) EnqueueRequest

func (a *Agent) EnqueueRequest(conn *nats.Conn, request pipelines.Work) error

EnqueueRequest sends shit to the agent to do

func (*Agent) String

func (a *Agent) String() string

String gives a string representation of the pool

type Miner

type Miner func(string) string

Miner is a message miner

func NewMiner

func NewMiner(config string) Miner

NewMiner constructs new miners based on the configuration strings. - @ Means always map to the same value - * Means map to any available worker

type Node

type Node struct {
	Name string
	CMD  string
	// contains filtered or unexported fields
}

Node is a graph node

func NewNode

func NewNode(name string, config dataType, isTest bool) *Node

NewNode starts a new node to work with

func (*Node) String

func (n *Node) String() string

type Pool

type Pool []*Agent

Pool is the primary pool of Agents

func (Pool) Len

func (p Pool) Len() int

Len calculates the size of the AgentPool

func (Pool) Less

func (p Pool) Less(i, j int) bool

Less does a simple size comparison

func (Pool) Peek

func (p Pool) Peek() interface{}

Peek gives the top element without affecting the heap

func (*Pool) Pop

func (p *Pool) Pop() interface{}

Pop gets an item from the heap

func (*Pool) Push

func (p *Pool) Push(x interface{})

Push puts an item into the heap

func (Pool) Swap

func (p Pool) Swap(i, j int)

Swap changes the index of two items in the AgentPool

Jump to

Keyboard shortcuts

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