burrow: github.com/hyperledger/burrow/execution/registry Index | Files

package registry

import "github.com/hyperledger/burrow/execution/registry"

Index

Package Files

cache.go registry.go registry.pb.go

Variables

var (
    ErrInvalidLengthRegistry        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowRegistry          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupRegistry = fmt.Errorf("proto: unexpected end of group")
)

type Cache Uses

type Cache struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

Cache helps prevent unnecessary IAVLTree updates and garbage generation.

func NewCache Uses

func NewCache(backend Reader) *Cache

NewCache returns a Cache which can write to an output Writer via Sync. Not goroutine safe, use syncStateCache if you need concurrent access

func (*Cache) Backend Uses

func (cache *Cache) Backend() Reader

func (*Cache) GetNodeByID Uses

func (cache *Cache) GetNodeByID(id crypto.Address) (*NodeIdentity, error)

func (*Cache) GetNodeIDsByAddress Uses

func (cache *Cache) GetNodeIDsByAddress(net string) ([]crypto.Address, error)

func (*Cache) GetNumPeers Uses

func (cache *Cache) GetNumPeers() int

func (*Cache) RemoveNode Uses

func (cache *Cache) RemoveNode(id crypto.Address) error

func (*Cache) Reset Uses

func (cache *Cache) Reset(backend Reader)

Reset the cache to empty initialising the backing map to the same size as the previous iteration

func (*Cache) Sync Uses

func (cache *Cache) Sync(state Writer) error

Sync writes whatever is in the cache to the output state. Does not flush the cache, to do that call Reset() after Sync or use Flush if your wish to use the output state as your next backend

func (*Cache) UpdateNode Uses

func (cache *Cache) UpdateNode(id crypto.Address, node *NodeIdentity) error

type Iterable Uses

type Iterable interface {
    IterateNodes(consumer func(crypto.Address, *NodeIdentity) error) (err error)
}

type IterableReader Uses

type IterableReader interface {
    Iterable
    Reader
}

type IterableReaderWriter Uses

type IterableReaderWriter interface {
    Iterable
    ReaderWriter
}

type NodeFilter Uses

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

func NewNodeFilter Uses

func NewNodeFilter(state IterableReader) *NodeFilter

func (*NodeFilter) NumPeers Uses

func (nf *NodeFilter) NumPeers() int

func (*NodeFilter) QueryPeerByAddress Uses

func (nf *NodeFilter) QueryPeerByAddress(addr string) bool

func (*NodeFilter) QueryPeerByID Uses

func (nf *NodeFilter) QueryPeerByID(id string) bool

type NodeIdentity Uses

type NodeIdentity struct {
    // Peer moniker name
    Moniker string `protobuf:"bytes,1,opt,name=Moniker,proto3" json:"Moniker,omitempty"`
    // Peer network address
    NetworkAddress string `protobuf:"bytes,2,opt,name=NetworkAddress,proto3" json:"NetworkAddress,omitempty"`
    // The Tendermint p2p node ID
    TendermintNodeID github_com_hyperledger_burrow_crypto.Address `protobuf:"bytes,3,opt,name=TendermintNodeID,proto3,customtype=github.com/hyperledger/burrow/crypto.Address" json:"TendermintNodeID"`
    // The public key that this node will validate with if it becomes a validator
    // (use this to create a binding between p2p node ID and validator)
    ValidatorPublicKey   github_com_hyperledger_burrow_crypto.PublicKey `protobuf:"bytes,4,opt,name=ValidatorPublicKey,proto3,customtype=github.com/hyperledger/burrow/crypto.PublicKey" json:"ValidatorPublicKey"`
    XXX_NoUnkeyedLiteral struct{}                                       `json:"-"`
    XXX_unrecognized     []byte                                         `json:"-"`
    XXX_sizecache        int32                                          `json:"-"`
}

NodeIdentity stores and establishes a binding between 4 different types of identifiers, a human readable name, a advertised network address, a p2p station-to-station key, and a validator key. Updates must be signed by the node key and the validator key to prove the update is consensual.

func (*NodeIdentity) Descriptor Uses

func (*NodeIdentity) Descriptor() ([]byte, []int)

func (*NodeIdentity) GetMoniker Uses

func (m *NodeIdentity) GetMoniker() string

func (*NodeIdentity) GetNetworkAddress Uses

func (m *NodeIdentity) GetNetworkAddress() string

func (*NodeIdentity) Marshal Uses

func (m *NodeIdentity) Marshal() (dAtA []byte, err error)

func (*NodeIdentity) MarshalTo Uses

func (m *NodeIdentity) MarshalTo(dAtA []byte) (int, error)

func (*NodeIdentity) MarshalToSizedBuffer Uses

func (m *NodeIdentity) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NodeIdentity) ProtoMessage Uses

func (*NodeIdentity) ProtoMessage()

func (*NodeIdentity) Reset Uses

func (m *NodeIdentity) Reset()

func (*NodeIdentity) Size Uses

func (m *NodeIdentity) Size() (n int)

func (*NodeIdentity) String Uses

func (rn *NodeIdentity) String() string

func (*NodeIdentity) Unmarshal Uses

func (m *NodeIdentity) Unmarshal(dAtA []byte) error

func (*NodeIdentity) XXX_DiscardUnknown Uses

func (m *NodeIdentity) XXX_DiscardUnknown()

func (*NodeIdentity) XXX_Marshal Uses

func (m *NodeIdentity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NodeIdentity) XXX_Merge Uses

func (m *NodeIdentity) XXX_Merge(src proto.Message)

func (*NodeIdentity) XXX_MessageName Uses

func (*NodeIdentity) XXX_MessageName() string

func (*NodeIdentity) XXX_Size Uses

func (m *NodeIdentity) XXX_Size() int

func (*NodeIdentity) XXX_Unmarshal Uses

func (m *NodeIdentity) XXX_Unmarshal(b []byte) error

type NodeStats Uses

type NodeStats struct {
    Addresses map[string]map[crypto.Address]struct{}
}

func NewNodeStats Uses

func NewNodeStats() NodeStats

func (*NodeStats) GetAddresses Uses

func (ns *NodeStats) GetAddresses(net string) []crypto.Address

func (*NodeStats) Insert Uses

func (ns *NodeStats) Insert(net string, id crypto.Address)

func (*NodeStats) Remove Uses

func (ns *NodeStats) Remove(node *NodeIdentity) bool

type Reader Uses

type Reader interface {
    GetNodeByID(crypto.Address) (*NodeIdentity, error)
    GetNodeIDsByAddress(net string) ([]crypto.Address, error)
    GetNumPeers() int
}

type ReaderWriter Uses

type ReaderWriter interface {
    Reader
    Writer
}

type Writer Uses

type Writer interface {
    // Updates the node, creating it if it does not exist
    UpdateNode(crypto.Address, *NodeIdentity) error
    // Remove the node by address
    RemoveNode(crypto.Address) error
}

Package registry imports 10 packages (graph) and is imported by 32 packages. Updated 2020-04-23. Refresh now. Tools for package owners.