membership

package
v1.0.0-beta5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New member identity

func NewRefCache

func NewRefCache(refresh time.Duration) *lazycache.Cache

NewRefCache a cache of membership references that refreshed with the given interval

Types

type CacheKey

type CacheKey interface {
	lazycache.Key
	Context() Context
	ChannelID() string
	ChConfigRef() *lazyref.Reference
}

CacheKey membership reference cache key

func NewCacheKey

func NewCacheKey(context Context, chConfigRef *lazyref.Reference, channelID string) (CacheKey, error)

NewCacheKey returns a new CacheKey

type Context

type Context struct {
	core.Providers
	EndpointConfig fab.EndpointConfig
}

Context holds the providers

type Ref

type Ref struct {
	*lazyref.Reference
	// contains filtered or unexported fields
}

Ref membership reference that refreshes to load the given channel config reference

func NewRef

func NewRef(refresh time.Duration, context Context, chConfigRef *lazyref.Reference) *Ref

NewRef returns a new membership reference

func (*Ref) ContainsMSP

func (ref *Ref) ContainsMSP(msp string) bool

ContainsMSP checks if given MSP is available in the underlying reference

func (*Ref) Validate

func (ref *Ref) Validate(serializedID []byte) error

Validate calls validate on the underlying reference

func (*Ref) Verify

func (ref *Ref) Verify(serializedID []byte, msg []byte, sig []byte) error

Verify calls validate on the underlying reference

Jump to

Keyboard shortcuts

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