Documentation ¶
Index ¶
Constants ¶
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 ¶
type LOOPPService struct { goplugin.PluginService[*GRPCService[types.PluginProvider], types.ReportingPluginFactory] }
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.
func (*LOOPPService) NewReportingPlugin ¶
func (g *LOOPPService) NewReportingPlugin(ctx context.Context, config ocrtypes.ReportingPluginConfig) (ocrtypes.ReportingPlugin, ocrtypes.ReportingPluginInfo, error)
type LOOPPServiceValidation ¶
type LOOPPServiceValidation struct { goplugin.PluginService[*GRPCService[types.PluginProvider], core.ValidationService] }
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)
}