Documentation
¶
Index ¶
- type RPCPlugin
- type RPCServer
- func (t *RPCServer) CredentialImport(req proto.ImportCredentialRequest, resp *sdk.ImportOutput) error
- func (t *RPCServer) CredentialProvisionerDeprovision(req proto.DeprovisionCredentialRequest, resp *sdk.DeprovisionOutput) error
- func (t *RPCServer) CredentialProvisionerDescription(req proto.ProvisionerID, resp *string) error
- func (t *RPCServer) CredentialProvisionerProvision(req proto.ProvisionCredentialRequest, resp *sdk.ProvisionOutput) error
- func (t *RPCServer) ExecutableNeedsAuth(req proto.ExecutableNeedsAuthRequest, resp *bool) error
- func (t *RPCServer) GetPlugin(_ int, resp *proto.GetPluginResponse) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCPlugin ¶
RPCPlugin is an implementation of the github.com/hashicorp/go-plugin#Plugin interface indicating how to serve a Shell Plugin over RPC using go-plugin.
type RPCServer ¶
type RPCServer struct {
// contains filtered or unexported fields
}
RPCServer makes a schema.Plugin available over RPC. Any method on this struct is available to a client over RPC.
The schema.Plugin struct has various slices that contain functions or interfaces that should also be available over RPC. Since Go's rpc package does not support storing functions in structs, these functions and interfaces are removed from the schema.Plugin and stored in a map. These functions can then be called by making a separate RPC call that includes the address in this map.
func (*RPCServer) CredentialImport ¶
func (t *RPCServer) CredentialImport(req proto.ImportCredentialRequest, resp *sdk.ImportOutput) error
CredentialImport is a remote version of the Import() function in schema.CredentialType. The call is forwarded to the Import() function of the credential identified by req.CredentialID.
func (*RPCServer) CredentialProvisionerDeprovision ¶
func (t *RPCServer) CredentialProvisionerDeprovision(req proto.DeprovisionCredentialRequest, resp *sdk.DeprovisionOutput) error
CredentialProvisionerDeprovision is a remote version of the the Deprovision() method of the sdk.Provisioner interface. The call is forwarded to the Deprovision() function of the Provisioner of the credential identified by req.CredentialID.
func (*RPCServer) CredentialProvisionerDescription ¶
func (t *RPCServer) CredentialProvisionerDescription(req proto.ProvisionerID, resp *string) error
CredentialProvisionerDescription is a remote version of the the Description() method of the sdk.Provisioner interface. The call is forwarded to the Description() function of the Provisioner of the credential identified by req.CredentialID.
func (*RPCServer) CredentialProvisionerProvision ¶
func (t *RPCServer) CredentialProvisionerProvision(req proto.ProvisionCredentialRequest, resp *sdk.ProvisionOutput) error
CredentialProvisionerProvision is a remote version of the the Provision() method of the sdk.Provisioner interface. The call is forwarded to the Provision() function of the Provisioner of the credential identified by req.CredentialID.
func (*RPCServer) ExecutableNeedsAuth ¶
func (t *RPCServer) ExecutableNeedsAuth(req proto.ExecutableNeedsAuthRequest, resp *bool) error
ExecutableNeedsAuth is a remote version of the NeedsAuth function in schema.Executable. The call is forwarded to Executables[req.ExecutableID].NeedsAuth of the original plugin.
func (*RPCServer) GetPlugin ¶
func (t *RPCServer) GetPlugin(_ int, resp *proto.GetPluginResponse) error
GetPlugin returns the schema.Plugin for this RPCServer. All functions and interfaces in this plugin are set to nil. The caller of this function is responsible for replacing those values with an implementation that calls these functions over RPC.