Documentation ¶
Index ¶
- func GetInstance() api.ConfigService
- type ConfigServiceImpl
- func (csi *ConfigServiceImpl) Get(channelID string, configKey api.ConfigKey) ([]byte, bool, errors.Error)
- func (csi *ConfigServiceImpl) GetConfigFromLedger(channelID string, configKey api.ConfigKey) ([]byte, bool, errors.Error)
- func (csi *ConfigServiceImpl) GetFromCache(channelID string, configKey api.ConfigKey) ([]byte, errors.Error)
- func (csi *ConfigServiceImpl) GetViper(channelID string, configKey api.ConfigKey, configType api.ConfigType) (*viper.Viper, bool, errors.Error)
- func (csi *ConfigServiceImpl) Refresh(stub shim.ChaincodeStubInterface, mspID string) errors.Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstance ¶
func GetInstance() api.ConfigService
GetInstance gets instance of cache for snaps
Types ¶
type ConfigServiceImpl ¶
type ConfigServiceImpl struct {
// contains filtered or unexported fields
}
ConfigServiceImpl used to create cache instance
func Initialize ¶
func Initialize(stub shim.ChaincodeStubInterface, mspID string) *ConfigServiceImpl
Initialize will be called from config snap
func (*ConfigServiceImpl) Get ¶
func (csi *ConfigServiceImpl) Get(channelID string, configKey api.ConfigKey) ([]byte, bool, errors.Error)
Get items from cache
func (*ConfigServiceImpl) GetConfigFromLedger ¶ added in v0.1.5
func (csi *ConfigServiceImpl) GetConfigFromLedger(channelID string, configKey api.ConfigKey) ([]byte, bool, errors.Error)
GetConfigFromLedger - gets snaps configs from ledger
func (*ConfigServiceImpl) GetFromCache ¶ added in v0.2.2
func (csi *ConfigServiceImpl) GetFromCache(channelID string, configKey api.ConfigKey) ([]byte, errors.Error)
GetFromCache get items from cache
func (*ConfigServiceImpl) GetViper ¶ added in v0.1.2
func (csi *ConfigServiceImpl) GetViper(channelID string, configKey api.ConfigKey, configType api.ConfigType) (*viper.Viper, bool, errors.Error)
GetViper configuration as Viper
func (*ConfigServiceImpl) Refresh ¶
func (csi *ConfigServiceImpl) Refresh(stub shim.ChaincodeStubInterface, mspID string) errors.Error
Refresh adds new items into cache and refreshes existing ones
Click to show internal directories.
Click to hide internal directories.