-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Internalize unnecessarily published plugin packages (#273)
- Loading branch information
Showing
28 changed files
with
86 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
// Package host2plugin contains a gRPC server (plugin) and client (host). | ||
// Package host2plugin exposes a gRPC client for use on a host (TFLint). | ||
// | ||
// In the plugin system, this communication is the first thing that happens, | ||
// and a plugin must use this package to provide a gRPC server. | ||
// However, the detailed implementation is hidden in the tflint.RuleSet interface, | ||
// and plugin developers usually don't need to be aware of gRPC server behavior. | ||
// | ||
// When the host initializes a gRPC client, go-plugin starts a gRPC server | ||
// on the plugin side as another process. This package acts as a wrapper for go-plugin. | ||
// Separately, the Check function initializes a new gRPC client for plugin-to-host | ||
// communication. See the plugin2host package for details. | ||
// The implementation details are hidden in internal/host2plugin and | ||
// the exposed ones are minimal. They are not intended to be used by plugins. | ||
// For that reason, this package is subject to breaking changes without notice, | ||
// and the changes do not follow the SDK versioning policy. | ||
package host2plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package host2plugin | ||
|
||
import "github.com/terraform-linters/tflint-plugin-sdk/plugin/internal/host2plugin" | ||
|
||
// Client is a host-side implementation. Host can send requests through the client to plugin's gRPC server. | ||
type Client = host2plugin.GRPCClient | ||
|
||
// ClientOpts is an option for initializing a Client. | ||
type ClientOpts = host2plugin.ClientOpts | ||
|
||
// NewClient returns a new gRPC client for host-to-plugin communication. | ||
var NewClient = host2plugin.NewClient |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Package host2plugin contains a gRPC server (plugin) and client (host). | ||
// | ||
// In the plugin system, this communication is the first thing that happens, | ||
// and a plugin must use this package to provide a gRPC server. | ||
// However, the detailed implementation is hidden in the tflint.RuleSet interface, | ||
// and plugin developers usually don't need to be aware of gRPC server behavior. | ||
// | ||
// When the host initializes a gRPC client, go-plugin starts a gRPC server | ||
// on the plugin side as another process. This package acts as a wrapper for go-plugin. | ||
// Separately, the Check function initializes a new gRPC client for plugin-to-host | ||
// communication. See the plugin2host package for details. | ||
package host2plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Package plugin2host contains a gRPC server (host) and client (plugin). | ||
// | ||
// Communication from the plugin to the host is the second one that occurs. | ||
// To understand what happens first, see the host2plugin package first. | ||
// The gRPC client used by the plugin is implicitly initialized by the host2plugin | ||
// package and hidden in the tflint.Runner interface. Normally, plugin developers | ||
// do not need to be aware of the details of this client. | ||
// | ||
// The host starts a gRPC server as goroutine to respond from the plugin side | ||
// when calling Check function in host2plugin. Please note that the gRPC server | ||
// and client startup in plugin2host is not due to go-plugin. | ||
package plugin2host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
plugin/proto/tflint.pb.go → plugin/internal/proto/tflint.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
// Package plugin2host contains a gRPC server (host) and client (plugin). | ||
// Package plugin2host exposes a gRPC server for use on a host (TFLint). | ||
// | ||
// Communication from the plugin to the host is the second one that occurs. | ||
// To understand what happens first, see the host2plugin package first. | ||
// The gRPC client used by the plugin is implicitly initialized by the host2plugin | ||
// package and hidden in the tflint.Runner interface. Normally, plugin developers | ||
// do not need to be aware of the details of this client. | ||
// | ||
// The host starts a gRPC server as goroutine to respond from the plugin side | ||
// when calling Check function in host2plugin. Please note that the gRPC server | ||
// and client startup in plugin2host is not due to go-plugin. | ||
// The implementation details are hidden in internal/plugin2host and | ||
// the exposed ones are minimal. They are not intended to be used by plugins. | ||
// For that reason, this package is subject to breaking changes without notice, | ||
// and the changes do not follow the SDK versioning policy. | ||
package plugin2host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package plugin2host | ||
|
||
import "github.com/terraform-linters/tflint-plugin-sdk/plugin/internal/plugin2host" | ||
|
||
// Server is the interface that the host should implement when a plugin communicates with the host. | ||
type Server = plugin2host.Server |