client

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCore

func NewCore(identity api.Identity, opts ...CoreOpt) (api.Core, error)

Types

type CoreOpt

type CoreOpt func(c *core) error

CoreOpt describes opt which will be applied to coreOptions

func WithConfigRaw

func WithConfigRaw(config config.Config) CoreOpt

WithConfigRaw allows passing to core created config instance

func WithConfigYaml

func WithConfigYaml(configPath string) CoreOpt

WithConfigYaml allows passing path to YAML configuration file

func WithContext

func WithContext(ctx context.Context) CoreOpt

WithContext allows passing custom context. Otherwise, context.Background is used

func WithCrypto added in v0.6.3

func WithCrypto(cc config.CryptoConfig) CoreOpt

WithCrypto allows to init core crypto suite.

func WithFabricV2 added in v0.6.3

func WithFabricV2(fabricV2 bool) CoreOpt

WithFabricV2 toggles core to use fabric version 2.

func WithLogger

func WithLogger(log *zap.Logger) CoreOpt

WithLogger allows to pass custom copy of zap.Logger insteadof logger.DefaultLogger

func WithOrderer

func WithOrderer(orderer api.Orderer) CoreOpt

WithOrderer allows using custom instance of orderer in core

func WithPeerPool

func WithPeerPool(pool api.PeerPool) CoreOpt

WithPeerPool allows adding custom peer pool

func WithPeers added in v0.6.3

func WithPeers(mspID string, peers []config.ConnectionConfig) CoreOpt

WithPeers allows to init core with peers for specified mspID.

type SeekOptConverter added in v0.7.0

type SeekOptConverter struct {
	GetChannelHeight func(ctx context.Context, channel string) (uint64, error)

	Logger *zap.Logger
	// contains filtered or unexported fields
}

func NewSeekOptConverter added in v0.7.0

func NewSeekOptConverter(c *core) *SeekOptConverter

func (*SeekOptConverter) ByBlockRange added in v0.7.0

func (so *SeekOptConverter) ByBlockRange(ctx context.Context, channel string, blockRange ...int64) (api.EventCCSeekOption, error)

func (*SeekOptConverter) ChannelHeight added in v0.7.0

func (so *SeekOptConverter) ChannelHeight(ctx context.Context, channel string) (uint64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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