server: Index | Files

package pkicache

import ""

Package pkicache provides a rudimentary cached representation of a PKI Document suitable for server use.


Package Files


type Entry Uses

type Entry struct {
    // contains filtered or unexported fields

Entry is a cached PKI Document.

func New Uses

func New(d *pki.Document, identityKey *eddsa.PublicKey, isProvider bool) (*Entry, error)

New constructs a new Entry from a given document.

func (*Entry) Document Uses

func (e *Entry) Document() *pki.Document

Document returns the PKI document backing the Entry.

func (*Entry) Epoch Uses

func (e *Entry) Epoch() uint64

Epoch returns the epoch that the cached PKI document is valid for.

func (*Entry) GetByID Uses

func (e *Entry) GetByID(id *[constants.NodeIDLength]byte) *pki.MixDescriptor

GetByID returns the MixDescriptor by node ID, or nil iff the node ID is not listed in the document.

func (*Entry) GetIncomingByID Uses

func (e *Entry) GetIncomingByID(id *[constants.NodeIDLength]byte) *pki.MixDescriptor

GetIncomingByID returns the MixDescriptor for a incoming connection source queried by node ID, or nil iff the node ID is not a valid source.

func (*Entry) GetOutgoingByID Uses

func (e *Entry) GetOutgoingByID(id *[constants.NodeIDLength]byte) *pki.MixDescriptor

GetOutgoingByID returns the MixDescriptor for an outgoing connection destination queried by node ID, or nil iff the node ID is not a valid destination.

func (*Entry) MuMaxDelay Uses

func (e *Entry) MuMaxDelay() uint64

MixMaxDelay returns the MixMaxDelay for the cached PKI document.

func (*Entry) Outgoing Uses

func (e *Entry) Outgoing() []*pki.MixDescriptor

Outgoing returns a slice of all MixDescriptors that describe valid outgoing connection destinations.

func (*Entry) Self Uses

func (e *Entry) Self() *pki.MixDescriptor

Self returns the descriptor for the current node.

func (*Entry) SendRatePerMinute Uses

func (e *Entry) SendRatePerMinute() uint64

SendRatePerMinute returns the SendRatePerMinute for the cached PKI document.

Package pkicache imports 4 packages (graph) and is imported by 3 packages. Updated 2019-04-17. Refresh now. Tools for package owners.