github.com/Consensys/quorum@v21.1.0+incompatible/plugin/account/connector.go (about)

     1  package account
     2  
     3  import (
     4  	"context"
     5  
     6  	iplugin "github.com/ethereum/go-ethereum/internal/plugin"
     7  	"github.com/hashicorp/go-plugin"
     8  	"github.com/jpmorganchase/quorum-account-plugin-sdk-go/proto"
     9  	"google.golang.org/grpc"
    10  )
    11  
    12  const ConnectorName = "account"
    13  
    14  type PluginConnector struct {
    15  	plugin.Plugin
    16  }
    17  
    18  func (*PluginConnector) GRPCServer(_ *plugin.GRPCBroker, _ *grpc.Server) error {
    19  	return iplugin.ErrNotSupported
    20  }
    21  
    22  func (*PluginConnector) GRPCClient(_ context.Context, _ *plugin.GRPCBroker, cc *grpc.ClientConn) (interface{}, error) {
    23  	return &service{
    24  		client: proto.NewAccountServiceClient(cc),
    25  	}, nil
    26  }