github.com/defanghe/fabric@v2.1.1+incompatible/core/container/ccintf/ccintf.go (about) 1 /* 2 Copyright IBM Corp. All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 7 package ccintf 8 9 import ( 10 "github.com/hyperledger/fabric/internal/pkg/comm" 11 12 pb "github.com/hyperledger/fabric-protos-go/peer" 13 ) 14 15 // These structures can/should probably be moved out of here. 16 17 // ChaincodeStream interface for stream between Peer and chaincode instance. 18 type ChaincodeStream interface { 19 Send(*pb.ChaincodeMessage) error 20 Recv() (*pb.ChaincodeMessage, error) 21 } 22 23 // PeerConnection instructs the chaincode how to connect back to the peer 24 type PeerConnection struct { 25 Address string 26 TLSConfig *TLSConfig 27 } 28 29 // TLSConfig is used to pass the TLS context into the chaincode launch 30 type TLSConfig struct { 31 ClientCert []byte 32 ClientKey []byte 33 RootCert []byte 34 } 35 36 // ChaincodeServerInfo provides chaincode connection information 37 type ChaincodeServerInfo struct { 38 Address string 39 ClientConfig comm.ClientConfig 40 }