Documentation

Overview

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

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Entry

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

      Entry is a cached PKI Document.

      func New

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

        New constructs a new Entry from a given document.

        func (*Entry) Document

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

          Document returns the PKI document backing the Entry.

          func (*Entry) Epoch

          func (e *Entry) Epoch() uint64

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

            func (*Entry) GetByID

            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

              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

                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

                  func (e *Entry) MuMaxDelay() uint64

                    MixMaxDelay returns the MixMaxDelay for the cached PKI document.

                    func (*Entry) Outgoing

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

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

                      func (*Entry) Self

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

                        Self returns the descriptor for the current node.

                        func (*Entry) SendRatePerMinute

                        func (e *Entry) SendRatePerMinute() uint64

                          SendRatePerMinute returns the SendRatePerMinute for the cached PKI document.

                          Source Files