github.com/true-sqn/fabric@v2.1.1+incompatible/integration/pluggable/testdata/plugins/endorsement/plugin.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package main
     8  
     9  import (
    10  	endorsement "github.com/hyperledger/fabric/core/handlers/endorsement/api"
    11  	"github.com/hyperledger/fabric/core/handlers/endorsement/builtin"
    12  	"github.com/hyperledger/fabric/integration/pluggable"
    13  )
    14  
    15  // go build -buildmode=plugin -o plugin.so
    16  
    17  // NewPluginFactory is the function ran by the plugin infrastructure to create an endorsement plugin factory.
    18  func NewPluginFactory() endorsement.PluginFactory {
    19  	pluggable.PublishEndorsementPluginActivation()
    20  	return &builtin.DefaultEndorsementFactory{}
    21  }