dynamicselection

package
v1.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 22 Imported by: 26 modules, 26 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CCPolicyProvider

type CCPolicyProvider interface {
	GetChaincodePolicy(chaincodeID string) (*common.SignaturePolicyEnvelope, error)
}

CCPolicyProvider retrieves policy for the given chaincode ID

type ChannelUser

type ChannelUser struct {
	ChannelID string
	Username  string
	OrgName   string
}

ChannelUser contains user(identity) info to be used for specific channel

type Opt

type Opt func(*SelectionProvider)

Opt applies a selection provider option

func WithCacheTimeout

func WithCacheTimeout(timeout time.Duration) Opt

WithCacheTimeout sets the expiration timeout of the cache

func WithLoadBalancePolicy

func WithLoadBalancePolicy(lbp pgresolver.LoadBalancePolicy) Opt

WithLoadBalancePolicy sets the load-balance policy

type SelectionProvider

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

SelectionProvider implements selection provider TODO: refactor users into client contexts

func New

func New(config core.Config, users []ChannelUser, opts ...Opt) (*SelectionProvider, error)

New returns dynamic selection provider

func (*SelectionProvider) Close

func (p *SelectionProvider) Close()

Close the selection services created by this provider

func (*SelectionProvider) CreateSelectionService

func (p *SelectionProvider) CreateSelectionService(channelID string) (fab.SelectionService, error)

CreateSelectionService creates a selection service

func (*SelectionProvider) Initialize

func (p *SelectionProvider) Initialize(providers contextAPI.Providers) error

Initialize allow for initializing providers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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