grpcplugin

package
v0.0.0-...-900be4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultProtocolVersion is the protocol version assumed for legacy clients that don't specify
	// a particular version or version 1 during their handshake. This is currently the version used
	// since Grafarg launched support for backend plugins.
	DefaultProtocolVersion = 1
)

Variables

This section is empty.

Functions

func NewBackendPlugin

func NewBackendPlugin(pluginID, executablePath string, startFns PluginStartFuncs) backendplugin.PluginFactoryFunc

NewBackendPlugin creates a new backend plugin factory used for registering a backend plugin.

func NewRendererPlugin

func NewRendererPlugin(pluginID, executablePath string, startFns PluginStartFuncs) backendplugin.PluginFactoryFunc

NewRendererPlugin creates a new renderer plugin factory used for registering a backend renderer plugin.

Types

type Client

type Client struct {
	DataPlugin     grpcplugin.DataClient
	RendererPlugin pluginextensionv2.RendererPlugin
}

Client client for communicating with a plugin using the current (v2) plugin protocol.

type LegacyClient

type LegacyClient struct {
	DatasourcePlugin datasourceV1.DatasourcePlugin
	RendererPlugin   rendererV1.RendererPlugin
}

LegacyClient client for communicating with a plugin using the v1 plugin protocol.

type LegacyStartFunc

type LegacyStartFunc func(pluginID string, client *LegacyClient, logger log.Logger) error

LegacyStartFunc callback function called when a plugin with old plugin protocol is started.

type PluginDescriptor

type PluginDescriptor struct {
	// contains filtered or unexported fields
}

PluginDescriptor is a descriptor used for registering backend plugins.

type PluginStartFuncs

type PluginStartFuncs struct {
	OnLegacyStart LegacyStartFunc
	OnStart       StartFunc
}

PluginStartFuncs functions called for plugin when started.

type StartFunc

type StartFunc func(pluginID string, client *Client, logger log.Logger) error

StartFunc callback function called when a plugin with current plugin protocol version is started.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL