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

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