client

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: AGPL-3.0 Imports: 16 Imported by: 4

Documentation

Overview

Package client implements the Katzenpost voting authority client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config) (pki.Client, error)

New constructs a new pki.Client instance.

Types

type Client added in v0.0.7

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

Client is a PKI client.

func (*Client) Deserialize added in v0.0.7

func (c *Client) Deserialize(raw []byte) (*pki.Document, error)

Deserialize returns PKI document given the raw bytes.

func (*Client) Get added in v0.0.7

func (c *Client) Get(ctx context.Context, epoch uint64) (*pki.Document, []byte, error)

Get returns the PKI document along with the raw serialized form for the provided epoch.

func (*Client) Post added in v0.0.7

func (c *Client) Post(ctx context.Context, epoch uint64, signingKey *eddsa.PrivateKey, d *pki.MixDescriptor) error

Post posts the node's descriptor to the PKI for the provided epoch.

type Config

type Config struct {
	// LogBackend is the `core/log` Backend instance to use for logging.
	LogBackend *log.Backend

	// Authorities is the set of Directory Authority servers.
	Authorities []*config.AuthorityPeer

	// DialContextFn is the optional alternative Dialer.DialContext function
	// to be used when creating outgoing network connections.
	DialContextFn func(ctx context.Context, network, address string) (net.Conn, error)
}

Config is a voting authority pki.Client instance.

Jump to

Keyboard shortcuts

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