pkiclient

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package pkiclient implements a caching wrapper around core/pki.Client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex
	worker.Worker
	// contains filtered or unexported fields
}

Client is a caching PKI client.

func New

func New(impl pki.Client) *Client

New constructs a new Client backed by an existing pki.Client instance.

func (*Client) Deserialize

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

Deserialize returns PKI document given the raw bytes.

func (*Client) Get

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

Get returns the PKI document for the provided epoch.

func (*Client) Halt

func (c *Client) Halt()

Halt tears down the Client instance.

func (*Client) Post

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.

Jump to

Keyboard shortcuts

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