reportingplugins

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 17 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const PluginServiceName = "plugin-service"

PluginServiceName is the name for types.PluginClient/[NewGRPCService].

Variables

This section is empty.

Functions

func ReportingPluginHandshakeConfig

func ReportingPluginHandshakeConfig() plugin.HandshakeConfig

Types

type GRPCService

type GRPCService[T types.PluginProvider] struct {
	plugin.NetRPCUnsupportedPlugin

	loop.BrokerConfig

	PluginServer ProviderServer[T]
	// contains filtered or unexported fields
}

GRPCService is the loopp interface for a plugin that can run an arbitrary product in the core node. By specifying `T`, server instances can request a specific provider type.

func (*GRPCService[T]) ClientConfig

func (g *GRPCService[T]) ClientConfig() *plugin.ClientConfig

func (*GRPCService[T]) GRPCClient

func (g *GRPCService[T]) GRPCClient(_ context.Context, broker *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)

GRPCClient implements plugin.GRPCPlugin and returns the pluginClient types.PluginClient, updated with the new broker and conn.

func (*GRPCService[T]) GRPCServer

func (g *GRPCService[T]) GRPCServer(broker *plugin.GRPCBroker, server *grpc.Server) error

type LOOPPService

LOOPPService is a types.Service that maintains an internal types.PluginClient.

func NewLOOPPService

func NewLOOPPService(
	lggr logger.Logger,
	grpcOpts loop.GRPCOpts,
	cmd func() *exec.Cmd,
	config core.ReportingPluginServiceConfig,
	providerConn grpc.ClientConnInterface,
	pipelineRunner core.PipelineRunnerService,
	telemetryService core.TelemetryService,
	errorLog core.ErrorLog,
	keyValueStore core.KeyValueStore,
	relayerSet core.RelayerSet,
) *LOOPPService

NewLOOPPService returns a new [*PluginService]. cmd must return a new exec.Cmd each time it is called. We use a `conn` here rather than a provider so that we can enforce proxy providers being passed in.

type LOOPPServiceValidation

type LOOPPServiceValidation struct {
	goplugin.PluginService[*GRPCService[types.PluginProvider], core.ValidationService]
}

func NewLOOPPServiceValidation

func NewLOOPPServiceValidation(
	lggr logger.Logger,
	grpcOpts loop.GRPCOpts,
	cmd func() *exec.Cmd,
) *LOOPPServiceValidation

func (*LOOPPServiceValidation) ValidateConfig

func (g *LOOPPServiceValidation) ValidateConfig(ctx context.Context, config map[string]interface{}) error

type MedianProviderServer

type MedianProviderServer = median.ProviderServer

type OCR3CapabilityProviderServer

type OCR3CapabilityProviderServer = ocr3capability.ProviderServer

type PluginProviderServer

type PluginProviderServer = pluginprovider.PluginProviderServer

These implement `ConnToProvider` and return the conn wrapped as the specified provider type. They can be embedded into the server struct for ease of use.

type ProviderServer

type ProviderServer[T types.PluginProvider] interface {
	core.ReportingPluginServer[T]
	ConnToProvider(conn grpc.ClientConnInterface, broker net.Broker, brokerConfig loop.BrokerConfig) T
}

type ValidateConfigService

type ValidateConfigService interface {
	NewValidationService(ctx context.Context) (core.ValidationService, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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