Skip to content

Commit

Permalink
Revise package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 committed Jun 22, 2020
1 parent c5fcef3 commit ae48d2b
Show file tree
Hide file tree
Showing 17 changed files with 485 additions and 394 deletions.
3 changes: 2 additions & 1 deletion plugin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/hashicorp/go-hclog"
plugin "github.com/hashicorp/go-plugin"
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
tfserver "github.com/terraform-linters/tflint-plugin-sdk/tflint/server"
)

// Client is an RPC client for use by the host
Expand Down Expand Up @@ -65,7 +66,7 @@ func (c *Client) ApplyConfig(config *tflint.Config) error {

// Check queries the RPC server for Check
// For bi-directional communication, you can pass a server that accepts Runner's queries
func (c *Client) Check(server tflint.Server) error {
func (c *Client) Check(server tfserver.Server) error {
brokerID := c.broker.NextId()
go c.broker.AcceptAndServe(brokerID, server)

Expand Down
3 changes: 2 additions & 1 deletion plugin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package plugin
import (
plugin "github.com/hashicorp/go-plugin"
"github.com/terraform-linters/tflint-plugin-sdk/tflint"
tfclient "github.com/terraform-linters/tflint-plugin-sdk/tflint/client"
)

// Server is an RPC server acting as a plugin
Expand Down Expand Up @@ -58,5 +59,5 @@ func (s *Server) Check(brokerID uint32, resp *interface{}) error {
return err
}

return s.impl.Check(tflint.NewClient(conn))
return s.impl.Check(tfclient.NewClient(conn))
}
323 changes: 0 additions & 323 deletions tflint/client.go

This file was deleted.

Loading

0 comments on commit ae48d2b

Please sign in to comment.