worker

package
Version: v0.0.0-...-986d81d Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package worker contains the structs and logic to handle routing, encrypting, and analyzing traffic over the quantum network. Each worker handles one direction of network traffic, either incoming traffic from remote nodes or outgoing traffic destined for remote nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Incoming

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

Incoming packet struct for handleing packets coming in off of a Socket struct which are destined for a Device struct.

func NewIncoming

func NewIncoming(cfg *common.Config, aggregator *metric.Aggregator, rt *router.Router, plugins []plugin.Plugin, dev device.Device, sock socket.Socket) *Incoming

NewIncoming generates a new Incoming worker which once started will handle packets coming from the remote nodes in the quantum network destined for the local node.

func (*Incoming) Start

func (incoming *Incoming) Start(queue int)

Start handling packets.

func (*Incoming) Stop

func (incoming *Incoming) Stop()

Stop handling packets.

type Outgoing

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

Outgoing packet struct for handleing packets coming in off of a Device which are destined for a Socket.

func NewOutgoing

func NewOutgoing(cfg *common.Config, aggregator *metric.Aggregator, rt *router.Router, plugins []plugin.Plugin, dev device.Device, sock socket.Socket) *Outgoing

NewOutgoing generates an Outgoing worker which once started will handle packets coming from the local node destined for remote nodes in the quantum network.

func (*Outgoing) Start

func (outgoing *Outgoing) Start(queue int)

Start handling packets.

func (*Outgoing) Stop

func (outgoing *Outgoing) Stop()

Stop handling packets and shutdown.

Jump to

Keyboard shortcuts

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