Documentation
¶
Overview ¶
Package protocol defines the plugin protocol version and compatibility checking.
Package protocol defines the plugin protocol version and compatibility checking.
Package protocol provides conversion utilities between internal and external plugin types.
Package protocol defines the plugin protocol version and compatibility checking.
Index ¶
Constants ¶
const ( // PluginTypeGoPlugin is an alias to the public constant. PluginTypeGoPlugin = tinctplugin.PluginTypeGoPlugin // PluginTypeJSON is an alias to the public constant. PluginTypeJSON = tinctplugin.PluginTypeJSON )
const MinCompatibleVersion = plugin.MinCompatibleVersion
MinCompatibleVersion is an alias to the public minimum compatible version.
const ProtocolVersion = plugin.ProtocolVersion
ProtocolVersion is an alias to the public plugin protocol version.
Variables ¶
var Handshake = tinctplugin.Handshake
Handshake is an alias to the public plugin.Handshake configuration.
Functions ¶
func IsCompatible ¶
IsCompatible checks if a plugin protocol version is compatible with the current tinct version. Rules: - Major version must match exactly (breaking changes). - Minor version can be higher (backward compatible). - Patch version can be any value (bug fixes only).
Types ¶
type DetectorResult ¶
type DetectorResult struct {
// Type indicates which protocol the plugin uses.
Type PluginType
// SupportsGoPlugin indicates if the plugin binary has go-plugin support.
SupportsGoPlugin bool
// PluginInfo contains metadata from --plugin-info.
PluginInfo PluginInfo
}
DetectorResult contains information about a detected plugin protocol.
func DetectProtocol ¶
func DetectProtocol(pluginPath string) (*DetectorResult, error)
DetectProtocol detects which protocol a plugin uses by querying it.
type FlagHelp ¶
FlagHelp is a type alias to the public plugin.FlagHelp type. External plugins should import github.com/jmylchreest/tinct/pkg/plugin directly.
type PluginInfo ¶
type PluginInfo = plugin.PluginInfo
PluginInfo is a type alias to the public plugin.PluginInfo type. External plugins should import github.com/jmylchreest/tinct/pkg/plugin directly.
type PluginType ¶
type PluginType = tinctplugin.PluginType
PluginType is an alias to the public plugin.PluginType type.