discovery

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 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 added in v0.7.0

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

Types

type EndpointsMapper added in v0.8.0

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.0

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

func (*EndpointsMapper) MapConnection added in v0.8.0

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

func (*EndpointsMapper) TlsConfigForAddress added in v0.8.0

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.0

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

type GossipDiscoveryProvider added in v0.7.0

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

func NewGossipDiscoveryProvider added in v0.7.0

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

func (*GossipDiscoveryProvider) Chaincode added in v0.7.0

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

func (*GossipDiscoveryProvider) Channel added in v0.7.0

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

func (*GossipDiscoveryProvider) LocalPeers added in v0.7.0

type LocalConfigProvider added in v0.7.0

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

func (*LocalConfigProvider) Chaincode added in v0.7.0

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

func (*LocalConfigProvider) Channel added in v0.7.0

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

func (*LocalConfigProvider) LocalPeers added in v0.7.0

type ServiceDiscoveryType added in v0.7.0

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