Documentation ¶
Index ¶
- func FromTxID(qscc GetBlockerInfo, txID string) func(*subscribeEventOption) error
- func WithDefaultSeek(seekOpts ...api.EventCCSeekOption) func(*subscribeEventOption) error
- func WithGetBlockByTx(seekOpts ...api.EventCCSeekOption) func(*subscribeEventOption)
- type Deliver
- func (d *Deliver) SubscribeBlock(ctx context.Context, channelName string, seekOpt ...api.EventCCSeekOption) (api.BlockSubscription, error)
- func (d *Deliver) SubscribeCC(ctx context.Context, channelName string, ccName string, ...) (api.EventCCSubscription, error)
- func (d *Deliver) SubscribeEvents(ctx context.Context, channelName string, ccName string, ...) (api.EventCCSubscription, error)
- func (d *Deliver) SubscribeTx(ctx context.Context, channelName string, txID string, ...) (api.TxSubscription, error)
- type GetBlockerInfo
- type SeekOptConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromTxID ¶
func FromTxID(qscc GetBlockerInfo, txID string) func(*subscribeEventOption) error
func WithDefaultSeek ¶
func WithDefaultSeek(seekOpts ...api.EventCCSeekOption) func(*subscribeEventOption) error
WithDefaultSeek need if fromTxID is empty
func WithGetBlockByTx ¶
func WithGetBlockByTx(seekOpts ...api.EventCCSeekOption) func(*subscribeEventOption)
Types ¶
type Deliver ¶ added in v0.8.0
type Deliver struct { Client peer.DeliverClient Identity msp.SigningIdentity // TlsCertHash used when creating seek envelope with enabled tls TLSCertHash []byte }
func New ¶
func New(deliverClient peer.DeliverClient, identity msp.SigningIdentity, tlsCertHash []byte) *Deliver
func (*Deliver) SubscribeBlock ¶ added in v0.8.0
func (d *Deliver) SubscribeBlock(ctx context.Context, channelName string, seekOpt ...api.EventCCSeekOption) (api.BlockSubscription, error)
func (*Deliver) SubscribeCC ¶ added in v0.8.0
func (d *Deliver) SubscribeCC(ctx context.Context, channelName string, ccName string, seekOpt ...api.EventCCSeekOption) (api.EventCCSubscription, error)
func (*Deliver) SubscribeEvents ¶ added in v0.8.0
func (d *Deliver) SubscribeEvents(ctx context.Context, channelName string, ccName string, setOpts ...func(*subscribeEventOption) error) (api.EventCCSubscription, error)
SubscribeEvents it is just once helper for save to api version today
func (*Deliver) SubscribeTx ¶ added in v0.8.0
func (d *Deliver) SubscribeTx(ctx context.Context, channelName string, txID string, seekOpt ...api.EventCCSeekOption) (api.TxSubscription, error)
type GetBlockerInfo ¶
type SeekOptConverter ¶
type SeekOptConverter struct { GetChannelHeight func(ctx context.Context, channel string) (uint64, error) Logger *zap.Logger // contains filtered or unexported fields }
func NewSeekOptConverter ¶
func NewSeekOptConverter(channelInfo api.ChannelInfo, logger *zap.Logger) *SeekOptConverter
func (*SeekOptConverter) ByBlockRange ¶
func (so *SeekOptConverter) ByBlockRange(ctx context.Context, channel string, blockRange ...int64) (api.EventCCSeekOption, error)
func (*SeekOptConverter) ChannelHeight ¶
Click to show internal directories.
Click to hide internal directories.