0Pricing
Go Academy · Lesson

Alternatives: HashiCorp go-plugin

RPC-based plugins for cross-platform support

Why go-plugin?

The native Go plugin package is Linux/macOS only, requires identical dependency versions, and cannot unload plugins. HashiCorp go-plugin solves these problems by running plugins as separate processes communicating via RPC (gRPC or net/rpc).

Architecture

go-plugin runs the plugin binary as a subprocess. The host starts it, establishes a gRPC/net/rpc connection, and calls the plugin through a generated client. The plugin process is killed on host exit.

All lessons in this course

  1. Go plugin Package Basics
  2. Designing a Plugin Interface
  3. Dynamic Loading and Symbols
  4. Alternatives: HashiCorp go-plugin
← Back to Go Academy