Documentation ¶
Index ¶
- func Register(server *rpc.Server, thing interface{}) (name string, err error)
- type BasicError
- type Client
- type ProviderFunc
- type ProvisionerFunc
- type ResourceProvider
- func (p *ResourceProvider) Apply(info *terraform.InstanceInfo, s *terraform.InstanceState, ...) (*terraform.InstanceState, error)
- func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error
- func (p *ResourceProvider) Diff(info *terraform.InstanceInfo, s *terraform.InstanceState, ...) (*terraform.InstanceDiff, error)
- func (p *ResourceProvider) Input(input terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
- func (p *ResourceProvider) Refresh(info *terraform.InstanceInfo, s *terraform.InstanceState) (*terraform.InstanceState, error)
- func (p *ResourceProvider) Resources() []terraform.ResourceType
- func (p *ResourceProvider) Validate(c *terraform.ResourceConfig) ([]string, []error)
- func (p *ResourceProvider) ValidateResource(t string, c *terraform.ResourceConfig) ([]string, []error)
- type ResourceProviderApplyArgs
- type ResourceProviderApplyResponse
- type ResourceProviderConfigureResponse
- type ResourceProviderDiffArgs
- type ResourceProviderDiffResponse
- type ResourceProviderInputArgs
- type ResourceProviderInputResponse
- type ResourceProviderRefreshArgs
- type ResourceProviderRefreshResponse
- type ResourceProviderServer
- func (s *ResourceProviderServer) Apply(args *ResourceProviderApplyArgs, result *ResourceProviderApplyResponse) error
- func (s *ResourceProviderServer) Configure(config *terraform.ResourceConfig, reply *ResourceProviderConfigureResponse) error
- func (s *ResourceProviderServer) Diff(args *ResourceProviderDiffArgs, result *ResourceProviderDiffResponse) error
- func (s *ResourceProviderServer) Input(args *ResourceProviderInputArgs, reply *ResourceProviderInputResponse) error
- func (s *ResourceProviderServer) Refresh(args *ResourceProviderRefreshArgs, result *ResourceProviderRefreshResponse) error
- func (s *ResourceProviderServer) Resources(nothing interface{}, result *[]terraform.ResourceType) error
- func (s *ResourceProviderServer) Validate(args *ResourceProviderValidateArgs, reply *ResourceProviderValidateResponse) error
- func (s *ResourceProviderServer) ValidateResource(args *ResourceProviderValidateResourceArgs, ...) error
- type ResourceProviderValidateArgs
- type ResourceProviderValidateResourceArgs
- type ResourceProviderValidateResourceResponse
- type ResourceProviderValidateResponse
- type ResourceProvisioner
- type ResourceProvisionerApplyArgs
- type ResourceProvisionerApplyResponse
- type ResourceProvisionerServer
- type ResourceProvisionerValidateArgs
- type ResourceProvisionerValidateResponse
- type Server
- type UIInput
- type UIInputInputResponse
- type UIInputServer
- type UIOutput
- type UIOutputServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicError ¶
type BasicError struct {
Message string
}
This is a type that wraps error types so that they can be messaged across RPC channels. Since "error" is an interface, we can't always gob-encode the underlying structure. This is a valid error interface implementer that we will push across.
func NewBasicError ¶
func NewBasicError(err error) *BasicError
func (*BasicError) Error ¶
func (e *BasicError) Error() string
type Client ¶ added in v0.3.0
type Client struct {
// contains filtered or unexported fields
}
Client connects to a Server in order to request plugin implementations for Terraform.
func NewClient ¶ added in v0.3.0
func NewClient(conn io.ReadWriteCloser) (*Client, error)
NewClient creates a client from an already-open connection-like value. Dial is typically used instead.
func (*Client) Close ¶ added in v0.3.0
Close closes the connection. The client is no longer usable after this is called.
func (*Client) ResourceProvider ¶ added in v0.3.0
func (c *Client) ResourceProvider() (terraform.ResourceProvider, error)
func (*Client) ResourceProvisioner ¶ added in v0.3.0
func (c *Client) ResourceProvisioner() (terraform.ResourceProvisioner, error)
type ProviderFunc ¶ added in v0.3.0
type ProviderFunc func() terraform.ResourceProvider
ProviderFunc creates terraform.ResourceProviders when they're requested from the server.
type ProvisionerFunc ¶ added in v0.3.0
type ProvisionerFunc func() terraform.ResourceProvisioner
ProvisionerFunc creates terraform.ResourceProvisioners when they're requested from the server.
type ResourceProvider ¶
ResourceProvider is an implementation of terraform.ResourceProvider that communicates over RPC.
func (*ResourceProvider) Apply ¶
func (p *ResourceProvider) Apply( info *terraform.InstanceInfo, s *terraform.InstanceState, d *terraform.InstanceDiff) (*terraform.InstanceState, error)
func (*ResourceProvider) Configure ¶
func (p *ResourceProvider) Configure(c *terraform.ResourceConfig) error
func (*ResourceProvider) Diff ¶
func (p *ResourceProvider) Diff( info *terraform.InstanceInfo, s *terraform.InstanceState, c *terraform.ResourceConfig) (*terraform.InstanceDiff, error)
func (*ResourceProvider) Input ¶ added in v0.3.0
func (p *ResourceProvider) Input( input terraform.UIInput, c *terraform.ResourceConfig) (*terraform.ResourceConfig, error)
func (*ResourceProvider) Refresh ¶
func (p *ResourceProvider) Refresh( info *terraform.InstanceInfo, s *terraform.InstanceState) (*terraform.InstanceState, error)
func (*ResourceProvider) Resources ¶
func (p *ResourceProvider) Resources() []terraform.ResourceType
func (*ResourceProvider) Validate ¶
func (p *ResourceProvider) Validate(c *terraform.ResourceConfig) ([]string, []error)
func (*ResourceProvider) ValidateResource ¶
func (p *ResourceProvider) ValidateResource( t string, c *terraform.ResourceConfig) ([]string, []error)
type ResourceProviderApplyArgs ¶
type ResourceProviderApplyArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState Diff *terraform.InstanceDiff }
type ResourceProviderApplyResponse ¶
type ResourceProviderApplyResponse struct { State *terraform.InstanceState Error *BasicError }
type ResourceProviderConfigureResponse ¶
type ResourceProviderConfigureResponse struct {
Error *BasicError
}
type ResourceProviderDiffArgs ¶
type ResourceProviderDiffArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState Config *terraform.ResourceConfig }
type ResourceProviderDiffResponse ¶
type ResourceProviderDiffResponse struct { Diff *terraform.InstanceDiff Error *BasicError }
type ResourceProviderInputArgs ¶ added in v0.3.0
type ResourceProviderInputArgs struct { InputId uint32 Config *terraform.ResourceConfig }
type ResourceProviderInputResponse ¶ added in v0.3.0
type ResourceProviderInputResponse struct { Config *terraform.ResourceConfig Error *BasicError }
type ResourceProviderRefreshArgs ¶ added in v0.3.0
type ResourceProviderRefreshArgs struct { Info *terraform.InstanceInfo State *terraform.InstanceState }
type ResourceProviderRefreshResponse ¶
type ResourceProviderRefreshResponse struct { State *terraform.InstanceState Error *BasicError }
type ResourceProviderServer ¶
type ResourceProviderServer struct { Broker *muxBroker Provider terraform.ResourceProvider }
ResourceProviderServer is a net/rpc compatible structure for serving a ResourceProvider. This should not be used directly.
func (*ResourceProviderServer) Apply ¶
func (s *ResourceProviderServer) Apply( args *ResourceProviderApplyArgs, result *ResourceProviderApplyResponse) error
func (*ResourceProviderServer) Configure ¶
func (s *ResourceProviderServer) Configure( config *terraform.ResourceConfig, reply *ResourceProviderConfigureResponse) error
func (*ResourceProviderServer) Diff ¶
func (s *ResourceProviderServer) Diff( args *ResourceProviderDiffArgs, result *ResourceProviderDiffResponse) error
func (*ResourceProviderServer) Input ¶ added in v0.3.0
func (s *ResourceProviderServer) Input( args *ResourceProviderInputArgs, reply *ResourceProviderInputResponse) error
func (*ResourceProviderServer) Refresh ¶
func (s *ResourceProviderServer) Refresh( args *ResourceProviderRefreshArgs, result *ResourceProviderRefreshResponse) error
func (*ResourceProviderServer) Resources ¶
func (s *ResourceProviderServer) Resources( nothing interface{}, result *[]terraform.ResourceType) error
func (*ResourceProviderServer) Validate ¶
func (s *ResourceProviderServer) Validate( args *ResourceProviderValidateArgs, reply *ResourceProviderValidateResponse) error
func (*ResourceProviderServer) ValidateResource ¶
func (s *ResourceProviderServer) ValidateResource( args *ResourceProviderValidateResourceArgs, reply *ResourceProviderValidateResourceResponse) error
type ResourceProviderValidateArgs ¶
type ResourceProviderValidateArgs struct {
Config *terraform.ResourceConfig
}
type ResourceProviderValidateResourceArgs ¶
type ResourceProviderValidateResourceArgs struct { Config *terraform.ResourceConfig Type string }
type ResourceProviderValidateResourceResponse ¶
type ResourceProviderValidateResourceResponse struct { Warnings []string Errors []*BasicError }
type ResourceProviderValidateResponse ¶
type ResourceProviderValidateResponse struct { Warnings []string Errors []*BasicError }
type ResourceProvisioner ¶
ResourceProvisioner is an implementation of terraform.ResourceProvisioner that communicates over RPC.
func (*ResourceProvisioner) Apply ¶
func (p *ResourceProvisioner) Apply( output terraform.UIOutput, s *terraform.InstanceState, c *terraform.ResourceConfig) error
func (*ResourceProvisioner) Validate ¶
func (p *ResourceProvisioner) Validate(c *terraform.ResourceConfig) ([]string, []error)
type ResourceProvisionerApplyArgs ¶
type ResourceProvisionerApplyArgs struct { OutputId uint32 State *terraform.InstanceState Config *terraform.ResourceConfig }
type ResourceProvisionerApplyResponse ¶
type ResourceProvisionerApplyResponse struct {
Error *BasicError
}
type ResourceProvisionerServer ¶
type ResourceProvisionerServer struct { Broker *muxBroker Provisioner terraform.ResourceProvisioner }
ResourceProvisionerServer is a net/rpc compatible structure for serving a ResourceProvisioner. This should not be used directly.
func (*ResourceProvisionerServer) Apply ¶
func (s *ResourceProvisionerServer) Apply( args *ResourceProvisionerApplyArgs, result *ResourceProvisionerApplyResponse) error
func (*ResourceProvisionerServer) Validate ¶
func (s *ResourceProvisionerServer) Validate( args *ResourceProvisionerValidateArgs, reply *ResourceProvisionerValidateResponse) error
type ResourceProvisionerValidateArgs ¶
type ResourceProvisionerValidateArgs struct {
Config *terraform.ResourceConfig
}
type ResourceProvisionerValidateResponse ¶
type ResourceProvisionerValidateResponse struct { Warnings []string Errors []*BasicError }
type Server ¶ added in v0.3.0
type Server struct { ProviderFunc ProviderFunc ProvisionerFunc ProvisionerFunc }
Server listens for network connections and then dispenses interface implementations for Terraform over net/rpc.
func (*Server) Accept ¶ added in v0.3.0
Accept accepts connections on a listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.
func (*Server) ServeConn ¶ added in v0.3.0
func (s *Server) ServeConn(conn io.ReadWriteCloser)
ServeConn runs a single connection.
ServeConn blocks, serving the connection until the client hangs up.
type UIInput ¶ added in v0.3.0
UIInput is an implementatin of terraform.UIInput that communicates over RPC.
type UIInputInputResponse ¶ added in v0.3.0
type UIInputInputResponse struct { Value string Error *BasicError }
type UIInputServer ¶ added in v0.3.0
UIInputServer is a net/rpc compatible structure for serving a UIInputServer. This should not be used directly.
func (*UIInputServer) Input ¶ added in v0.3.0
func (s *UIInputServer) Input( opts *terraform.InputOpts, reply *UIInputInputResponse) error
type UIOutput ¶ added in v0.3.0
UIOutput is an implementatin of terraform.UIOutput that communicates over RPC.
type UIOutputServer ¶ added in v0.3.0
UIOutputServer is the RPC server for serving UIOutput.
func (*UIOutputServer) Output ¶ added in v0.3.0
func (s *UIOutputServer) Output( v string, reply *interface{}) error