service

package
v0.2.21-metrics Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL