forked from hyperledger/fabric-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
orderer.go
27 lines (21 loc) · 776 Bytes
/
orderer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package fab
import (
reqContext "context"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
)
// Orderer The Orderer class represents a peer in the target blockchain network to which
// HFC sends a block of transactions of endorsed proposals requiring ordering.
type Orderer interface {
URL() string
SendBroadcast(ctx reqContext.Context, envelope *SignedEnvelope) (*common.Status, error)
SendDeliver(ctx reqContext.Context, envelope *SignedEnvelope) (chan *common.Block, chan error)
}
// A SignedEnvelope can can be sent to an orderer for broadcasting
type SignedEnvelope struct {
Payload []byte
Signature []byte
}