serverworker

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: 15 Imported by: 0

Documentation

Overview

Package serverworker gives additional functionalities to regular CoconutWorker that are required by a server instance.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID         uint64
	Params     *coconut.Params
	JobQueue   chan<- *jobpacket.JobPacket
	IncomingCh <-chan *commands.CommandRequest
	Log        *logger.Logger
	NymClient  *nymclient.Client
	Store      *storage.Database
}

Config encapsulates arguments passed in New to create new instance of the serverworker.

type IssuerWorker

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

type ProviderWorker

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

type ServerWorker

type ServerWorker struct {
	worker.Worker
	IssuerWorker
	ProviderWorker
	*coconutworker.CoconutWorker // TODO: since CoconutWorker does not have many attributes should we still use reference?
	// contains filtered or unexported fields
}

/ ServerWorker allows writing coconut actions to a shared job queue, so that they could be run concurrently.

func New

func New(cfg *Config) (*ServerWorker, error)

New creates new instance of a serverWorker.

func (*ServerWorker) RegisterAsIssuer

func (*ServerWorker) RegisterAsProvider

func (sw *ServerWorker) RegisterAsProvider(avk *coconut.VerificationKey,
	privateKey *ecdsa.PrivateKey,
	disableVerification bool,
) error

func (*ServerWorker) RegisterHandler

func (sw *ServerWorker) RegisterHandler(o interface{},
	hfn commandhandler.HandlerFunc,
	dfn func(commands.Command) commandhandler.HandlerData)

Directories

Path Synopsis
Package commandhandler contains functions that are used to resolve commands issued to issuers and providers.
Package commandhandler contains functions that are used to resolve commands issued to issuers and providers.

Jump to

Keyboard shortcuts

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