Documentation
¶
Index ¶
- func CacheConfiguration() (err error)
- func CreateChainFromBlock(cb *common.Block) error
- func GetCommitter(cid string) committer.Committer
- func GetCurrConfigBlock(cid string) *common.Block
- func GetLedger(cid string) ledger.PeerLedger
- func GetLocalAddress() (string, error)
- func GetLocalIP() string
- func GetPeerEndpoint() (*pb.PeerEndpoint, error)
- func InitChain(cid string)
- func Initialize(init func(string))
- func MockCreateChain(cid string) error
- func MockInitialize()
- func NewPeerClientConnection() (*grpc.ClientConn, error)
- func NewPeerClientConnectionWithAddress(peerAddress string) (*grpc.ClientConn, error)
- func SecurityEnabled() bool
- func SetCurrConfigBlock(block *common.Block, cid string) error
- func SyncBlocksChannelSize() int
- func SyncStateDeltasChannelSize() int
- func SyncStateSnapshotChannelSize() int
- func ValidatorEnabled() bool
- type DuplicateHandlerError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheConfiguration ¶
func CacheConfiguration() (err error)
CacheConfiguration computes and caches commonly-used constants and computed constants as package variables. Routines which were previously global have been embedded here to preserve the original abstraction.
func CreateChainFromBlock ¶
CreateChainFromBlock creates a new chain from config block
func GetCommitter ¶
GetCommitter returns the committer of the chain with chain ID. Note that this call returns nil if chain cid has not been created.
func GetCurrConfigBlock ¶
GetCurrConfigBlock returns the cached config block of the specified chain. Note that this call returns nil if chain cid has not been created.
func GetLedger ¶
func GetLedger(cid string) ledger.PeerLedger
GetLedger returns the ledger of the chain with chain ID. Note that this call returns nil if chain cid has not been created.
func GetLocalAddress ¶
GetLocalAddress returns the peer.address property
func GetPeerEndpoint ¶
func GetPeerEndpoint() (*pb.PeerEndpoint, error)
GetPeerEndpoint returns peerEndpoint from cached configuration
func InitChain ¶
func InitChain(cid string)
Take care to initialize chain after peer joined, for example deploys system CCs
func Initialize ¶
func Initialize(init func(string))
Initialize sets up any chains that the peer has from the persistence. This function should be called at the start up when the ledger and gossip ready
func MockCreateChain ¶
MockCreateChain used for creating a ledger for a chain for tests without havin to join
func NewPeerClientConnection ¶
func NewPeerClientConnection() (*grpc.ClientConn, error)
NewPeerClientConnection Returns a new grpc.ClientConn to the configured local PEER.
func NewPeerClientConnectionWithAddress ¶
func NewPeerClientConnectionWithAddress(peerAddress string) (*grpc.ClientConn, error)
NewPeerClientConnectionWithAddress Returns a new grpc.ClientConn to the configured local PEER.
func SecurityEnabled ¶
func SecurityEnabled() bool
SecurityEnabled returns the securityEnabled property from cached configuration
func SetCurrConfigBlock ¶
SetCurrConfigBlock sets the current config block of the specified chain
func SyncBlocksChannelSize ¶
func SyncBlocksChannelSize() int
SyncBlocksChannelSize returns the peer.sync.blocks.channelSize property
func SyncStateDeltasChannelSize ¶
func SyncStateDeltasChannelSize() int
SyncStateDeltasChannelSize returns the peer.sync.state.deltas.channelSize property
func SyncStateSnapshotChannelSize ¶
func SyncStateSnapshotChannelSize() int
SyncStateSnapshotChannelSize returns the peer.sync.state.snapshot.channelSize property
func ValidatorEnabled ¶
func ValidatorEnabled() bool
ValidatorEnabled returns the peer.validator.enabled property
Types ¶
type DuplicateHandlerError ¶
type DuplicateHandlerError struct {
To pb.PeerEndpoint
}
DuplicateHandlerError returned if attempt to register same chaincodeID while a stream already exists.
func (*DuplicateHandlerError) Error ¶
func (d *DuplicateHandlerError) Error() string