Back to godoc.org

Package membership

v1.0.0 (bdbc9bd)
Latest Go to latest
Published: 4 days ago | License: Apache-2.0 | Module: github.com/hyperledger/fabric-sdk-go

Index

Package Files

func New

func New(ctx Context, cfg fab.ChannelCfg) (fab.ChannelMembership, error)

New member identity

func NewRefCache

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

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

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier