...

Package api

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/api"
Overview
Index

Overview ▾

type Connection

Connection defines the functions for an event server connection

type Connection interface {
    // Receive sends events to the given channel
    Receive(chan<- interface{})
    // Close closes the connection
    Close()
    // Closed return true if the connection is closed
    Closed() bool
}

type ConnectionProvider

ConnectionProvider creates a Connection.

type ConnectionProvider func(context context.Client, chConfig fab.ChannelCfg, peer fab.Peer) (Connection, error)

type EventEndpoint

EventEndpoint extends a Peer endpoint and provides the event URL, which may or may not be the same as the Peer URL

type EventEndpoint interface {
    fab.Peer

    // Opts returns additional options for the connection
    Opts() []options.Opt
}