jobpacket

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package jobpacket provides allows implementing simple job queue.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobPacket

type JobPacket struct {
	OutCh chan<- interface{}
	Op    func() (interface{}, error)
}

JobPacket encapsulates the data required to perform given action concurrently, i.e. the actual operation and a channel to write the result to.

func MakeG1MulPacket

func MakeG1MulPacket(outCh chan<- interface{}, g1 *Curve.ECP, x *Curve.BIG) *JobPacket

MakeG1MulPacket creates a G1Mul job packet to be read by jobworkers.

func MakeG2MulPacket

func MakeG2MulPacket(outCh chan<- interface{}, g2 *Curve.ECP2, x *Curve.BIG) *JobPacket

MakeG2MulPacket creates a G2mul job packet to be read by jobworkers.

func MakePairingPacket

func MakePairingPacket(outCh chan<- interface{}, g1 *Curve.ECP, g2 *Curve.ECP2) *JobPacket

MakePairingPacket creates a pairing job packet to be read by jobworkers.

func New

func New(outCh chan<- interface{}, op func() (interface{}, error)) *JobPacket

New creates a new job packet to be written into a job queue.

Jump to

Keyboard shortcuts

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