Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrClosed is returned when a job is submitted after Close was called. ErrClosed = errors.New("use of closed batcher") // ErrCanceled is returned when a submitted job could not be processed before Close was called. ErrCanceled = errors.New("processing canceled") )
Functions ¶
This section is empty.
Types ¶
type Curl ¶
type Curl struct {
// contains filtered or unexported fields
}
Curl defines an instance of a batched Curl hasher.
func NewCurlP81 ¶
NewCurlP81 returns a new batched Curl-P-81.
func (*Curl) Close ¶
Close stops the batched Curl hasher. It blocks until all remaining jobs have been processed or canceled. Successive calls of Close are ignored.
func (*Curl) Hash ¶
Hash returns the Curl hash of trits. It blocks until the hash has been computed or an error occurred.
func (*Curl) SubmitHash ¶
func (c *Curl) SubmitHash(trits trinary.Trits) <-chan CurlResult
SubmitHash submits the Curl hash computation of trits to the batcher. It does not wait for the computation to finish but returns a channel for the result.
func (*Curl) WorkerCount ¶
WorkerCount returns the number of parallel workers computing the hashes.
type CurlResult ¶
CurlResult defines the result to a submitted hash computation.
Click to show internal directories.
Click to hide internal directories.