Documentation ¶
Index ¶
- Variables
- func CheckSpec(spec *pb.ChaincodeSpec) error
- func GetRootNode() (string, error)
- func LoggingInit(command string)
- func SetupTestConfig()
- func SetupTestLogging()
- type Config
- type Devops
- func (*Devops) Build(context context.Context, spec *pb.ChaincodeSpec) (*pb.ChaincodeDeploymentSpec, error)
- func (d *Devops) Deploy(ctx context.Context, spec *pb.ChaincodeSpec) (*pb.ChaincodeDeploymentSpec, error)
- func (d *Devops) Invoke(ctx context.Context, chaincodeInvocationSpec *pb.ChaincodeInvocationSpec) (*pb.Response, error)
- func (d *Devops) Login(ctx context.Context, secret *pb.Secret) (*pb.Response, error)
- func (d *Devops) Query(ctx context.Context, chaincodeInvocationSpec *pb.ChaincodeInvocationSpec) (*pb.Response, error)
- type PeerConnectionFSM
- type PeerInfo
- type ServerAdmin
- type ServerOpenchain
- func (s *ServerOpenchain) GetBlockByNumber(ctx context.Context, num *pb.BlockNumber) (*pb.Block, error)
- func (s *ServerOpenchain) GetBlockCount(ctx context.Context, e *google_protobuf1.Empty) (*pb.BlockCount, error)
- func (s *ServerOpenchain) GetBlockchainInfo(ctx context.Context, e *google_protobuf1.Empty) (*pb.BlockchainInfo, error)
- func (s *ServerOpenchain) GetPeers(ctx context.Context, e *google_protobuf1.Empty) (*pb.PeersMessage, error)
- func (s *ServerOpenchain) GetState(ctx context.Context, chaincodeID, key string) ([]byte, error)
- func (s *ServerOpenchain) GetTransactionByUUID(ctx context.Context, txUUID string) (*pb.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned if a requested resource does not exist ErrNotFound = errors.New("openchain: resource not found") )
Functions ¶
func CheckSpec ¶
func CheckSpec(spec *pb.ChaincodeSpec) error
CheckSpec to see if chaincode resides within current package capture for language.
func GetRootNode ¶
GetRootNode place holder function for providing a boostrap address for a Validating Peer.
func LoggingInit ¶
func LoggingInit(command string)
LoggingInit is a 'hook' called at the beginning of command processing to parse logging-related options specified either on the command-line or in config files. Command-line options take precedence over config file options, and can also be passed as suitably-named environment variables. To change module logging levels at runtime call `logging.SetLevel(level, module)`. To debug this routine include logging=debug as the first term of the logging specification.
func SetupTestConfig ¶
func SetupTestConfig()
SetupTestConfig setup the config during test execution
func SetupTestLogging ¶
func SetupTestLogging()
SetupTestLogging setup the logging during test execution
Types ¶
type Devops ¶
type Devops struct {
// contains filtered or unexported fields
}
Devops implementation of Devops services
func NewDevopsServer ¶
func NewDevopsServer(coord peer.MessageHandlerCoordinator) *Devops
NewDevopsServer creates and returns a new Devops server instance.
func (*Devops) Build ¶
func (*Devops) Build(context context.Context, spec *pb.ChaincodeSpec) (*pb.ChaincodeDeploymentSpec, error)
Build builds the supplied chaincode image
func (*Devops) Deploy ¶
func (d *Devops) Deploy(ctx context.Context, spec *pb.ChaincodeSpec) (*pb.ChaincodeDeploymentSpec, error)
Deploy deploys the supplied chaincode image to the validators through a transaction
func (*Devops) Invoke ¶
func (d *Devops) Invoke(ctx context.Context, chaincodeInvocationSpec *pb.ChaincodeInvocationSpec) (*pb.Response, error)
Invoke performs the supplied invocation on the specified chaincode through a transaction
type PeerConnectionFSM ¶
PeerConnectionFSM example FSM for demonstration purposes.
func NewPeerConnectionFSM ¶
func NewPeerConnectionFSM(to string) *PeerConnectionFSM
NewPeerConnectionFSM creates and returns a PeerConnectionFSM
type ServerAdmin ¶
type ServerAdmin struct { }
ServerAdmin implementation of the Admin service for the Peer
func NewAdminServer ¶
func NewAdminServer() *ServerAdmin
NewAdminServer creates and returns a Admin service instance.
func (*ServerAdmin) GetStatus ¶
func (*ServerAdmin) GetStatus(context.Context, *google_protobuf.Empty) (*pb.ServerStatus, error)
GetStatus reports the status of the server
func (*ServerAdmin) StartServer ¶
func (*ServerAdmin) StartServer(context.Context, *google_protobuf.Empty) (*pb.ServerStatus, error)
StartServer starts the server
func (*ServerAdmin) StopServer ¶
func (*ServerAdmin) StopServer(context.Context, *google_protobuf.Empty) (*pb.ServerStatus, error)
StopServer stops the server
type ServerOpenchain ¶
type ServerOpenchain struct {
// contains filtered or unexported fields
}
ServerOpenchain defines the Openchain server object, which holds the Ledger data structure and the pointer to the peerServer.
func NewOpenchainServer ¶
func NewOpenchainServer() (*ServerOpenchain, error)
NewOpenchainServer creates a new instance of the ServerOpenchain.
func NewOpenchainServerWithPeerInfo ¶
func NewOpenchainServerWithPeerInfo(peerServer PeerInfo) (*ServerOpenchain, error)
NewOpenchainServerWithPeerInfo creates a new instance of the ServerOpenchain.
func (*ServerOpenchain) GetBlockByNumber ¶
func (s *ServerOpenchain) GetBlockByNumber(ctx context.Context, num *pb.BlockNumber) (*pb.Block, error)
GetBlockByNumber returns the data contained within a specific block in the blockchain. The genesis block is block zero.
func (*ServerOpenchain) GetBlockCount ¶
func (s *ServerOpenchain) GetBlockCount(ctx context.Context, e *google_protobuf1.Empty) (*pb.BlockCount, error)
GetBlockCount returns the current number of blocks in the blockchain data structure.
func (*ServerOpenchain) GetBlockchainInfo ¶
func (s *ServerOpenchain) GetBlockchainInfo(ctx context.Context, e *google_protobuf1.Empty) (*pb.BlockchainInfo, error)
GetBlockchainInfo returns information about the blockchain ledger such as height, current block hash, and previous block hash.
func (*ServerOpenchain) GetPeers ¶
func (s *ServerOpenchain) GetPeers(ctx context.Context, e *google_protobuf1.Empty) (*pb.PeersMessage, error)
GetPeers returns a list of all peer nodes currently connected to the target peer.
func (*ServerOpenchain) GetTransactionByUUID ¶
func (s *ServerOpenchain) GetTransactionByUUID(ctx context.Context, txUUID string) (*pb.Transaction, error)
GetTransactionByUUID returns a transaction matching the specified UUID
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
obcpbft
Package obcpbft is a generated protocol buffer package.
|
Package obcpbft is a generated protocol buffer package. |
example
|
|
chaincode/chaincode_example03
This program is an erroneous chaincode program that attempts to put state in query context - query should return error
|
This program is an erroneous chaincode program that attempts to put state in query context - query should return error |
system_chaincode
|
|