Documentation
¶
Index ¶
- func BroadcastReceive(broadcast Broadcast, addr string, responses chan common.Status, ...)
- func BroadcastSend(broadcast Broadcast, envelope *common.Envelope) error
- func BroadcastWaitForResponse(responses chan common.Status, errs chan error) (common.Status, error)
- func NewOrdererClient(config *grpc2.ConnectionConfig) (*ordererClient, error)
- func NewService(sp view2.ServiceProvider, network Network) *service
- type Broadcast
- type Configuration
- type Network
- type OrdererClient
- type SerializableSigner
- type Signer
- type Transaction
- type UnpackedProposalResponse
- type ViewManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BroadcastReceive ¶
func BroadcastReceive(broadcast Broadcast, addr string, responses chan common.Status, errs chan error)
BroadcastReceive waits until it receives the response from broadcast stream
func BroadcastSend ¶
BroadcastSend sends transaction envelope to orderer service
func BroadcastWaitForResponse ¶
broadcastWaitForResponse reads from response and errs chans until responses chan is closed
func NewOrdererClient ¶
func NewOrdererClient(config *grpc2.ConnectionConfig) (*ordererClient, error)
func NewService ¶
func NewService(sp view2.ServiceProvider, network Network) *service
Types ¶
type Broadcast ¶
type Broadcast interface {
Send(m *common.Envelope) error
Recv() (*ab.BroadcastResponse, error)
CloseSend() error
}
Broadcast defines the interface that abstracts grpc calls to broadcast transactions to orderer
type Configuration ¶
type Configuration interface {
}
type Network ¶
type Network interface {
PickOrderer() *grpc.ConnectionConfig
LocalMembership() driver.LocalMembership
// Broadcast sends the passed blob to the ordering service to be ordered
Broadcast(blob interface{}) error
Channel(name string) (driver.Channel, error)
SignerService() driver.SignerService
Config() *config.Config
}
type OrdererClient ¶
type OrdererClient interface {
// NewBroadcast returns a Broadcast
NewBroadcast(ctx context.Context, opts ...grpc.CallOption) (Broadcast, error)
// Certificate returns tls certificate for the orderer client
Certificate() *tls.Certificate
Close()
}
OrdererClient defines the interface to create a Broadcast
type SerializableSigner ¶
type Transaction ¶
type UnpackedProposalResponse ¶
type UnpackedProposalResponse struct {
ChaincodeAction *pb.ChaincodeAction
TxRwSet *rwsetutil.TxRwSet
}
UnpackedProposalResponse contains the interesting artifacts from inside the proposal.
func UnpackProposalResponse ¶
func UnpackProposalResponse(payload []byte) (*UnpackedProposalResponse, error)
UnpackProposalResponse creates an an *UnpackedProposalResponse which is guaranteed to have no zero-ed fields or it returns an error.
func (*UnpackedProposalResponse) Results ¶
func (p *UnpackedProposalResponse) Results() []byte
type ViewManager ¶
Click to show internal directories.
Click to hide internal directories.