modulepackage
0.0.0-20240512102056-3e4cbfad1f6e
Repository: https://github.com/kform-dev/plugin.git
Documentation: pkg.go.dev
# Functions
This makes sure all the managed subprocesses are killed and properly logged.
Creates a new plugin client which manages the lifecycle of an external plugin and gets the address for the RPC connection.
Serve serves the plugins given by ServeConfig.
# Constants
CoreProtocolVersion is the ProtocolVersion of the plugin system itself.
EnvUnixSocketDir specifies the directory that _plugins_ should create unix sockets in.
EnvUnixSocketGroup specifies the owning, writable group to set for Unix sockets created by _plugins_.
GRPCServiceName is the name of the service that the health check should return as passing.
# Variables
ErrChecksumsDoNotMatch is returned when binary's checksum doesn't match the one provided in the SecureConfig.
ErrProcessNotFound is returned when a client is instantiated to reattach to an existing process and it isn't found.
ErrSecureConfigAndReattach is returned when both Reattach and SecureConfig are set.
ErrSecureNoChecksum is returned when an empty checksum is provided to the SecureConfig.
ErrSecureNoHash is returned when a nil Hash object is provided to the SecureConfig.
If this is 1, then we've called CleanupClients.
# Structs
Client handles the lifecycle of a plugin application.
ClientConfig is the configuration used to initialize a new plugin client.
GRPCBroker is responsible for brokering connections by unique ID.
GRPCClient connects to a GRPCServer over gRPC to dispense plugin types.
GRPCServer is a ServerType implementation that serves plugins over gRPC.
GRPCServerConfig is the extra configuration passed along for consumers to facilitate using GRPC plugins.
HandshakeConfig is the configuration used by client and servers to handshake before starting a plugin connection.
ReattachConfig is used to configure a client to reattach to an already-running plugin process.
SecureConfig is used to configure a client to verify the integrity of an executable before running.
ServeConfig configures what sorts of plugins are served.
No description provided by the author
# Interfaces
ClientProtocol is an interface that must be implemented for new plugin protocols to be clients.
Plugin is the interface that is implemented to serve/connect to a plugin over gRPC.
ServerProtocol is an interface that must be implemented for new plugin protocols to be servers.
# Type aliases
PluginSet is a set of plugins provided to be registered in the plugin server.