forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccintf.go
40 lines (31 loc) · 911 Bytes
/
ccintf.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
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package ccintf
import (
"github.com/hyperledger/fabric/core/comm"
pb "github.com/hyperledger/fabric-protos-go/peer"
)
// These structures can/should probably be moved out of here.
// ChaincodeStream interface for stream between Peer and chaincode instance.
type ChaincodeStream interface {
Send(*pb.ChaincodeMessage) error
Recv() (*pb.ChaincodeMessage, error)
}
// PeerConnection instructs the chaincode how to connect back to the peer
type PeerConnection struct {
Address string
TLSConfig *TLSConfig
}
// TLSConfig is used to pass the TLS context into the chaincode launch
type TLSConfig struct {
ClientCert []byte
ClientKey []byte
RootCert []byte
}
// ChaincodeServerInfo provides chaincode connection information
type ChaincodeServerInfo struct {
Address string
ClientConfig comm.ClientConfig
}