...

Package config

import "github.com/hyperledger/fabric/discovery/support/config"
Overview
Index

Overview ▾

func ValidateConfigEnvelope

func ValidateConfigEnvelope(ce *common.ConfigEnvelope) error

type CurrentConfigBlockGetter

CurrentConfigBlockGetter enables to fetch the last config block

type CurrentConfigBlockGetter interface {
    // GetCurrConfigBlock returns the current config block for the given channel
    GetCurrConfigBlock(channel string) *common.Block
}

type CurrentConfigBlockGetterFunc

CurrentConfigBlockGetterFunc enables to fetch the last config block

type CurrentConfigBlockGetterFunc func(channel string) *common.Block

func (CurrentConfigBlockGetterFunc) GetCurrConfigBlock

func (f CurrentConfigBlockGetterFunc) GetCurrConfigBlock(channel string) *common.Block

CurrentConfigBlockGetterFunc enables to fetch the last config block

type DiscoverySupport

DiscoverySupport implements support that is used for service discovery that is related to configuration

type DiscoverySupport struct {
    CurrentConfigBlockGetter
}

func NewDiscoverySupport

func NewDiscoverySupport(getLastConfigBlock CurrentConfigBlockGetter) *DiscoverySupport

NewDiscoverySupport creates a new DiscoverySupport

func (*DiscoverySupport) Config

func (s *DiscoverySupport) Config(channel string) (*discovery.ConfigResult, error)

Config returns the channel's configuration