Documentation ¶
Overview ¶
Package registry implements the registry application.
Index ¶
Constants ¶
View Source
const ( // AppID is the unique application identifier. AppID uint8 = 0x01 // AppName is the ABCI application name. AppName string = "200_registry" )
Variables ¶
View Source
var ( // EventType is the ABCI event type for registry events. EventType = api.EventTypeForApp(AppName) // QueryApp is a query for filtering events processed by // the registry application. QueryApp = api.QueryForApp(AppName) // KeyRuntimeRegistered is the ABCI event attribute for new // runtime registrations (value is the CBOR serialized runtime // descriptor). KeyRuntimeRegistered = []byte("runtime.registered") // KeyEntityRegistered is the ABCI event attribute for new entity // registrations (value is the CBOR serialized entity descriptor). KeyEntityRegistered = []byte("entity.registered") // KeyEntityDeregistered is the ABCI event attribute for entity // deregistrations (value is a CBOR serialized EntityDeregistration). KeyEntityDeregistered = []byte("entity.deregistered") // KeyNodeRegistered is the ABCI event attribute for new node // registrations (value is the CBOR serialized node descriptor). KeyNodeRegistered = []byte("nodes.registered") // KeyNodesExpired is the ABCI event attribute for node // deregistrations due to expiration (value is a CBOR serialized // vector of node descriptors). KeyNodesExpired = []byte("nodes.expired") // KeyNodeUnfrozen is the ABCI event attribute for when nodes // become unfrozen (value is CBOR serialized node ID). KeyNodeUnfrozen = []byte("nodes.unfrozen") // KeyRegistryNodeListEpoch is the ABCI event attribute for // registry epochs. KeyRegistryNodeListEpoch = []byte("nodes.epoch") )
Functions ¶
Types ¶
type EntityDeregistration ¶
EntityDeregistration is an entity deregistration.
type Query ¶
type Query interface { Entity(context.Context, signature.PublicKey) (*entity.Entity, error) Entities(context.Context) ([]*entity.Entity, error) Node(context.Context, signature.PublicKey) (*node.Node, error) NodeByConsensusAddress(context.Context, []byte) (*node.Node, error) NodeStatus(context.Context, signature.PublicKey) (*registry.NodeStatus, error) Nodes(context.Context) ([]*node.Node, error) Runtime(context.Context, common.Namespace) (*registry.Runtime, error) Runtimes(ctx context.Context, includeSuspended bool) ([]*registry.Runtime, error) Genesis(context.Context) (*registry.Genesis, error) }
Query is the registry query interface.
type QueryFactory ¶
type QueryFactory struct {
// contains filtered or unexported fields
}
QueryFactory is the registry query factory.
func NewQueryFactory ¶
func NewQueryFactory(state abciAPI.ApplicationQueryState) *QueryFactory
NewQueryFactory returns a new QueryFactory backed by the given state instance.
Click to show internal directories.
Click to hide internal directories.