membership

package
v0.0.0-...-4514fd0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 17 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(opts ...options.Opt) *lazycache.Cache

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

func WithErrorHandler

func WithErrorHandler(value fab.ErrorHandler) coptions.Opt

WithErrorHandler sets the error handler

func WithRefreshInterval

func WithRefreshInterval(value time.Duration) coptions.Opt

WithRefreshInterval sets the interval in which the channel config cache is refreshed

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(context Context, chConfigRef *lazyref.Reference, opts ...options.Opt) *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