Go Plugin banner
hashicorp hashicorp

Go Plugin

Development community

Description

Golang plugin system over RPC.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Go Plugin System over RPC

`go-plugin` is a Go (golang) plugin system over RPC. It is the plugin system that has been in use by HashiCorp tooling for over 4 years. While initially created for [Packer](https://www.packer.io), it is additionally in use by [Terraform](https://www.terraform.io), [Nomad](https://www.nomadproject.io), [Vault](https://www.vaultproject.io), [Boundary](https://www.boundaryproject.io), and [Waypoint](https://www.waypointproject.io).

While the plugin system is over RPC, it is currently only designed to work over a local [reliable] network. Plugins over a real network are not supported and will lead to unexpected behavior.

This plugin system has been used on millions of machines across many different projects and has proven to be battle hardened and ready for production use.

Features

The HashiCorp plugin system supports a number of features:

**Plugins are Go interface implementations.** This makes writing and consuming plugins feel very natural. To a plugin author: you just implement an interface as if it were going to run in the same process. For a plugin user: you just use and call functions on an interface as if it were in the same process. This plugin system handles the communication in between.

**Cross-language support.** Plugins can be written (and consumed) by almost every major language. This library supports serving plugins via [gRPC](http://www.grpc.io). gRPC-based plugins enable plugins to be written in any language.

**Complex arguments and return values are supported.** This library provides APIs for handling complex arguments and return values such as interfaces, `io.Reader/Writer`, etc. We do this by giving you a library (`MuxBroker`) for creating new connections between the client/server to serve additional interfaces or transfer raw data.

**Bidirectional communication.** Because the plugin system supports complex arguments, the host process can send it interface implementations and the plugin can call back into the