discovery

package
v1.4.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewService

func NewService(config Config, sup Support) *service

NewService creates a new discovery service instance

Types

type AccessControlSupport

type AccessControlSupport interface {
	// Eligible returns whether the given peer is eligible for receiving
	// service from the discovery service for a given channel
	EligibleForService(channel string, data common2.SignedData) error
}

AccessControlSupport checks if clients are eligible of being serviced

type Config

type Config struct {
	TLS                          bool
	AuthCacheEnabled             bool
	AuthCacheMaxSize             int
	AuthCachePurgeRetentionRatio float64
}

Config defines the configuration of the discovery service

func (Config) String

func (c Config) String() string

String returns a string representation of this Config

type ConfigSequenceSupport

type ConfigSequenceSupport interface {
	// ConfigSequence returns the configuration sequence of the a given channel
	ConfigSequence(channel string) uint64
}

ConfigSequenceSupport returns the config sequence of the given channel

type ConfigSupport

type ConfigSupport interface {
	// Config returns the channel's configuration
	Config(channel