Documentation
¶
Index ¶
- func LoadBootstrapConfig(conf *Config) error
- func OverwriteConfigFromBlock(conf *Config, configBlock *common.Block) error
- func OverwriteConfigFromBlockFile(conf *Config) error
- func OverwriteConfigFromEnvelope(conf *Config, envelope *common.Envelope) error
- type Bootstrap
- type Config
- type CoordinatorConfig
- type LedgerConfig
- type LedgerService
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadBootstrapConfig ¶
LoadBootstrapConfig loads the bootstrap config according to the bootstrap method.
func OverwriteConfigFromBlock ¶
OverwriteConfigFromBlock overwrites the orderer connection with fields from a config block.
func OverwriteConfigFromBlockFile ¶
OverwriteConfigFromBlockFile overwrites the orderer connection with fields from the bootstrap config block.
Types ¶
type Bootstrap ¶
type Bootstrap struct {
// GenesisBlockFilePath is the path for the genesis block.
// If omitted, the local configuration will be used.
GenesisBlockFilePath string `mapstructure:"genesis-block-file-path" yaml:"genesis-block-file-path,omitempty"`
}
Bootstrap configures how to obtain the bootstrap configuration.
type Config ¶
type Config struct {
Server *connection.ServerConfig `mapstructure:"server"`
Committer CoordinatorConfig `mapstructure:"committer"`
Ledger LedgerConfig `mapstructure:"ledger"`
Orderer broadcastdeliver.Config `mapstructure:"orderer"`
LastCommittedBlockSetInterval time.Duration `mapstructure:"last-committed-block-set-interval"`
WaitingTxsLimit int `mapstructure:"waiting-txs-limit"`
Monitoring monitoring.Config `mapstructure:"monitoring"`
Bootstrap Bootstrap `mapstructure:"bootstrap"`
}
Config holds the configuration of the sidecar service. This includes sidecar endpoint, committer endpoint to which the sidecar pushes the block and pulls statuses, and the config of ledger service, and the orderer setup. It may contain the orderer endpoint from which the sidecar pulls blocks.
type CoordinatorConfig ¶
type CoordinatorConfig struct {
Endpoint connection.Endpoint `mapstructure:"endpoint"`
}
CoordinatorConfig holds the endpoint of the coordinator component in the committer service.
type LedgerConfig ¶
type LedgerConfig struct {
Path string `mapstructure:"path"`
}
LedgerConfig holds the ledger path.
type LedgerService ¶
type LedgerService struct {
// contains filtered or unexported fields
}
LedgerService implements peer.DeliverServer.
func (*LedgerService) Deliver ¶
func (s *LedgerService) Deliver(srv peer.Deliver_DeliverServer) error
Deliver delivers the requested blocks.
func (*LedgerService) DeliverFiltered ¶
func (*LedgerService) DeliverFiltered(peer.Deliver_DeliverFilteredServer) error
DeliverFiltered implements an API in peer.DeliverServer. Deprecated: this method is implemented to have compatibility with Fabric so that the fabric smart client can easily integrate with both FabricX and Fabric. Eventually, this method will be removed.
func (*LedgerService) DeliverWithPrivateData ¶
func (*LedgerService) DeliverWithPrivateData(peer.Deliver_DeliverWithPrivateDataServer) error
DeliverWithPrivateData implements an API in peer.DeliverServer. Deprecated: this method is implemented to have compatibility with Fabric so that the fabric smart client can easily integrate with both FabricX and Fabric. Eventually, this method will be removed.
func (*LedgerService) GetBlockHeight ¶
func (s *LedgerService) GetBlockHeight() uint64
GetBlockHeight returns the height of the block store, i.e., the last committed block + 1. The +1 is needed to include block 0 as well.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is a relay service which relays the block from orderer to committer. Further, it aggregates the transaction status and forwards the validated block to clients who have registered on the ledger server.
func (*Service) GetLedgerService ¶
func (s *Service) GetLedgerService() *LedgerService
GetLedgerService returns the ledger that implements peer.DeliverServer.