Documentation ¶
Overview ¶
Package provider implements the mix provider.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BenchProvider ¶
type BenchProvider struct { *ProviderServer // contains filtered or unexported fields }
func NewBenchProvider ¶
func NewBenchProvider(provider *ProviderServer, numMessages int) (*BenchProvider, error)
func (*BenchProvider) RunBench ¶
func (p *BenchProvider) RunBench() error
Start creates loggers for capturing info and error logs and starts the listening server. Returns an error if any operation was unsuccessful.
type ClientRecord ¶
type ClientRecord struct {
// contains filtered or unexported fields
}
ClientRecord holds identity and network data for clients.
type ProviderIt ¶
type ProviderIt interface { networker.NetworkServer networker.NetworkClient Start() error GetConfig() config.MixConfig }
ProviderIt is the interface of a given Provider mix server
type ProviderServer ¶
ProviderServer is the data of a Provider mix server
func CreateTestProvider ¶
func CreateTestProvider() (*ProviderServer, error)
func NewProviderServer ¶
func NewProviderServer(id string, host string, port string, prvKey *sphinx.PrivateKey, pubKey *sphinx.PublicKey, ) (*ProviderServer, error)
NewProviderServer constructs a new provider object. NewProviderServer returns a new provider object and an error. TODO: same case as 'NewClient'
func (*ProviderServer) GetConfig ¶
func (p *ProviderServer) GetConfig() config.MixConfig
GetConfig returns the config.MixConfig for this ProviderServer
func (*ProviderServer) Shutdown ¶
func (p *ProviderServer) Shutdown()
Shutdown cleanly shuts down a given provider instance.
func (*ProviderServer) Start ¶
func (p *ProviderServer) Start() error
Start creates loggers for capturing info and error logs and starts the listening server. Returns an error if any operation was unsuccessful.
func (*ProviderServer) Wait ¶
func (p *ProviderServer) Wait()
Wait waits till the provider is terminated for any reason.