Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(stub resourcepb.ResourcePluginClient) resource.Provider
NewClient creates a Provider backed by a gRPC connection.
func NewServer ¶
func NewServer(provider resource.Provider, sp settings.Provider) resourcepb.ResourcePluginServer
NewServer creates a gRPC server wrapping the given Provider.
Types ¶
type GRPCPlugin ¶
type GRPCPlugin struct {
goplugin.Plugin
Impl resource.Provider
SettingsProvider settings.Provider
}
GRPCPlugin implements hashicorp/go-plugin.GRPCPlugin for the resource plugin.
func (*GRPCPlugin) GRPCClient ¶
func (p *GRPCPlugin) GRPCClient(_ context.Context, _ *goplugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
GRPCClient returns a resource.Provider backed by the given gRPC client connection.
func (*GRPCPlugin) GRPCServer ¶
func (p *GRPCPlugin) GRPCServer(_ *goplugin.GRPCBroker, s *grpc.Server) error
GRPCServer registers the resource plugin server on the given gRPC server.
Click to show internal directories.
Click to hide internal directories.