fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/connection Index | Files

package connection

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/deliverclient/connection"


Package Files



var (
    // Deliver creates a Deliver stream
    Deliver = func(client pb.DeliverClient) (deliverStream, error) {
        return client.Deliver(context.Background())

    // DeliverFiltered creates a DeliverFiltered stream
    DeliverFiltered = func(client pb.DeliverClient) (deliverStream, error) {
        return client.DeliverFiltered(context.Background())

type DeliverConnection Uses

type DeliverConnection struct {
    // contains filtered or unexported fields

DeliverConnection manages the connection to the deliver server

func New Uses

func New(ctx fabcontext.Client, chConfig fab.ChannelCfg, streamProvider StreamProvider, url string, opts ...options.Opt) (*DeliverConnection, error)

New returns a new Deliver Server connection

func (*DeliverConnection) Receive Uses

func (c *DeliverConnection) Receive(eventch chan<- interface{})

Receive receives events from the deliver server

func (*DeliverConnection) Send Uses

func (c *DeliverConnection) Send(seekInfo *ab.SeekInfo) error

Send sends a seek request to the deliver server

type Event Uses

type Event struct {
    SourceURL string
    Event     interface{}

Event contains the deliver event as well as the event source

func NewEvent Uses

func NewEvent(event interface{}, sourceURL string) *Event

NewEvent returns a deliver event

type StreamProvider Uses

type StreamProvider func(pb.DeliverClient) (deliverStream, error)

StreamProvider creates a deliver stream

Package connection imports 17 packages (graph) and is imported by 3 packages. Updated 2019-08-31. Refresh now. Tools for package owners.