Documentation ¶
Index ¶
- func CacheConfiguration() (err error)
- func CreateChainFromBlock(cb *common.Block) error
- func CreatePeerServer(listenAddress string, secureConfig comm.SecureServerConfig) (comm.GRPCServer, error)
- func GetChannelsInfo() []*pb.ChannelInfo
- func GetCurrConfigBlock(cid string) *common.Block
- func GetLedger(cid string) ledger.PeerLedger
- func GetLocalAddress() (string, error)
- func GetLocalIP() string
- func GetMSPIDs(cid string) []string
- func GetPeerEndpoint() (*pb.PeerEndpoint, error)
- func GetPeerServer() comm.GRPCServer
- func GetPolicyManager(cid string) policies.Manager
- func GetSecureConfig() (comm.SecureServerConfig, error)
- func InitChain(cid string)
- func Initialize(init func(string))
- func MockCreateChain(cid string) error
- func MockInitialize()
- func MockSetMSPIDGetter(mspIDGetter func(string) []string)
- func NewChannelPolicyManagerGetter() policies.ChannelPolicyManagerGetter
- func NewPeerClientConnection() (*grpc.ClientConn, error)
- func NewPeerClientConnectionWithAddress(peerAddress string) (*grpc.ClientConn, error)
- func SetCurrConfigBlock(block *common.Block, cid string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CacheConfiguration ¶ added in v1.0.0
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 ¶ added in v1.0.0
CreateChainFromBlock creates a new chain from config block
func CreatePeerServer ¶ added in v1.0.0
func CreatePeerServer(listenAddress string, secureConfig comm.SecureServerConfig) (comm.GRPCServer, error)
CreatePeerServer creates an instance of comm.GRPCServer This server is used for peer communications
func GetChannelsInfo ¶ added in v1.0.0
func GetChannelsInfo() []*pb.ChannelInfo
GetChannelsInfo returns an array with information about all channels for this peer
func GetCurrConfigBlock ¶ added in v1.0.0
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 ¶ added in v1.0.0
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 ¶ added in v1.0.0
GetLocalAddress returns the peer.address property
func GetLocalIP ¶ added in v1.0.0
func GetLocalIP() string
GetLocalIP returns the non loopback local IP of the host
func GetMSPIDs ¶ added in v1.0.0
GetMSPIDs returns the ID of each application MSP defined on this chain
func GetPeerEndpoint ¶ added in v1.0.0
func GetPeerEndpoint() (*pb.PeerEndpoint, error)
GetPeerEndpoint returns peerEndpoint from cached configuration
func GetPeerServer ¶ added in v1.0.0
func GetPeerServer() comm.GRPCServer
GetPeerServer returns the peer server instance
func GetPolicyManager ¶ added in v1.0.0
GetPolicyManager returns the policy manager of the chain with chain ID. Note that this call returns nil if chain cid has not been created.
func GetSecureConfig ¶ added in v1.0.0
func GetSecureConfig() (comm.SecureServerConfig, error)
GetSecureConfig returns the secure server configuration for the peer
func InitChain ¶ added in v1.0.0
func InitChain(cid string)
Take care to initialize chain after peer joined, for example deploys system CCs
func Initialize ¶ added in v1.0.0
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 ¶ added in v1.0.0
MockCreateChain used for creating a ledger for a chain for tests without havin to join
func MockInitialize ¶ added in v1.0.0
func MockInitialize()
MockInitialize resets chains for test env
func MockSetMSPIDGetter ¶ added in v1.0.0
func NewChannelPolicyManagerGetter ¶ added in v1.0.0
func NewChannelPolicyManagerGetter() policies.ChannelPolicyManagerGetter
NewChannelPolicyManagerGetter returns a new instance of ChannelPolicyManagerGetter
func NewPeerClientConnection ¶ added in v1.0.0
func NewPeerClientConnection() (*grpc.ClientConn, error)
NewPeerClientConnection Returns a new grpc.ClientConn to the configured local PEER.
func NewPeerClientConnectionWithAddress ¶ added in v1.0.0
func NewPeerClientConnectionWithAddress(peerAddress string) (*grpc.ClientConn, error)
NewPeerClientConnectionWithAddress Returns a new grpc.ClientConn to the configured local PEER.
Types ¶
This section is empty.