discovery

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoChannels      = errors.New(`channels not found`)
	ErrChannelNotFound = errors.New(`channel not found`)
	ErrNoChaincodes    = errors.New(`no chaincodes on channel`)
	ErrUnknownProvider = errors.New(`unknown discovery provider (forgotten import?)`)
)

Functions

func NewLocalConfigProvider

func NewLocalConfigProvider(options config.DiscoveryConfigOpts, tlsMapper connectionMapper) (api.DiscoveryProvider, error)

Types

type EndpointsMapper added in v0.8.5

type EndpointsMapper struct {
	// contains filtered or unexported fields
}

EndpointsMapper - if tls is enabled with gossip maps provided from cfg TLS certs to discovered peers

func NewEndpointsMapper added in v0.8.5

func NewEndpointsMapper(endpoints []config.Endpoint) *EndpointsMapper

func (*EndpointsMapper) MapConnection added in v0.8.5

func (m *EndpointsMapper) MapConnection(address string) *api.Endpoint

func (*EndpointsMapper) TlsConfigForAddress added in v0.8.5

func (m *EndpointsMapper) TlsConfigForAddress(address string) config.TlsConfig

TlsConfigForAddress - get tls config for provided address if config wasn't provided on startup time return disabled tls

func (*EndpointsMapper) TlsEndpointForAddress added in v0.8.5

func (m *EndpointsMapper) TlsEndpointForAddress(address string) string

type GossipDiscoveryProvider

type GossipDiscoveryProvider struct {
	// contains filtered or unexported fields
}

func NewGossipDiscoveryProvider

func NewGossipDiscoveryProvider(
	ctx context.Context,
	connCfg config.ConnectionConfig,
	log *zap.Logger,
	identitySigner discoveryclient.Signer,
	clientIdentity []byte,
	tlsMapper connectionMapper,
) (*GossipDiscoveryProvider, error)

func (*GossipDiscoveryProvider) Chaincode

func (d *GossipDiscoveryProvider) Chaincode(ctx context.Context, channelName string, ccName string) (api.ChaincodeDiscoverer, error)

func (*GossipDiscoveryProvider) Channel

func (d *GossipDiscoveryProvider) Channel(ctx context.Context, channelName string) (api.ChannelDiscoverer, error)

func (*GossipDiscoveryProvider) LocalPeers

type LocalConfigProvider

type LocalConfigProvider struct {
	// contains filtered or unexported fields
}

func (*LocalConfigProvider) Chaincode

func (d *LocalConfigProvider) Chaincode(_ context.Context, channelName, ccName string) (api.ChaincodeDiscoverer, error)

func (*LocalConfigProvider) Channel

func (d *LocalConfigProvider) Channel(_ context.Context, channelName string) (api.ChannelDiscoverer, error)

func (*LocalConfigProvider) LocalPeers

type ServiceDiscoveryType

type ServiceDiscoveryType string

ServiceDiscoveryType - what types of discovery we support

const (
	LocalConfigServiceDiscoveryType ServiceDiscoveryType = "local"
	GossipServiceDiscoveryType      ServiceDiscoveryType = "gossip"
)

Jump to

Keyboard shortcuts

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