Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeVersionedBytes(res any, vData *pb.VersionedBytes) error
- func EncodeVersionedBytes(data any, version uint32) (*pb.VersionedBytes, error)
- func NewChainReaderServer(impl types.ChainReader) pb.ChainReaderServer
- func NewChainReaderTestClient(conn *grpc.ClientConn) types.ChainReader
- func NewCodecServer(impl types.Codec) pb.CodecServer
- func NewCodecTestClient(conn *grpc.ClientConn) types.Codec
- func NewTelemetryClient(client types.TelemetryService) *telemetryClient
- func NewTelemetryServer(impl types.TelemetryService) *telemetryServer
- func NewTelemetryServiceClient(cc grpc.ClientConnInterface) *telemetryServiceClient
- func RegisterPluginMedianServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, ...) error
- func RegisterPluginRelayerServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl PluginRelayer) error
- func RegisterReportingPluginServiceServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, ...) error
- func RegisterStandAloneMedianProvider(s *grpc.Server, p types.MedianProvider)
- type AutomationProvider
- type Broker
- type BrokerConfig
- type ErrConfigDigestLen
- type ErrConnAccept
- type ErrConnDial
- type ErrUint8Bounds
- type FunctionsProvider
- type GRPCClientConn
- type GRPCOpts
- type MedianProvider
- type MedianProviderServer
- type MercuryProvider
- type PluginMedianClient
- func (s PluginMedianClient) Close() error
- func (s PluginMedianClient) HealthReport() map[string]error
- func (s PluginMedianClient) Name() string
- func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider types.MedianProvider, ...) (types.ReportingPluginFactory, error)
- func (s PluginMedianClient) Ready() error
- func (p PluginMedianClient) Refresh(broker Broker, conn *grpc.ClientConn)
- func (s PluginMedianClient) Start(ctx context.Context) error
- type PluginProviderServer
- type PluginRelayer
- type PluginRelayerClient
- type PluginService
- func (s *PluginService[P, S]) Close() error
- func (s *PluginService[P, S]) HealthReport() map[string]error
- func (s *PluginService[P, S]) Init(pluginName string, p P, newService func(context.Context, any) (S, error), ...)
- func (s *PluginService[P, S]) Name() string
- func (s *PluginService[P, S]) Ready() error
- func (s *PluginService[P, S]) Start(context.Context) error
- func (s *PluginService[P, S]) Wait() error
- func (s *PluginService[P, S]) WaitCtx(ctx context.Context) error
- func (s *PluginService[P, S]) XXXTestHook() TestPluginService[P, S]
- type Relayer
- type ReportingPluginServiceClient
- func (s ReportingPluginServiceClient) Close() error
- func (s ReportingPluginServiceClient) HealthReport() map[string]error
- func (s ReportingPluginServiceClient) Name() string
- func (m *ReportingPluginServiceClient) NewReportingPluginFactory(ctx context.Context, config types.ReportingPluginServiceConfig, ...) (types.ReportingPluginFactory, error)
- func (s ReportingPluginServiceClient) Ready() error
- func (p ReportingPluginServiceClient) Refresh(broker Broker, conn *grpc.ClientConn)
- func (s ReportingPluginServiceClient) Start(ctx context.Context) error
- type TestPluginService
Constants ¶
const ( JSONEncodingVersion1 = iota JSONEncodingVersion2 CBOREncodingVersion )
enum of all known encoding formats for versioned data
const CurrentEncodingVersion = CBOREncodingVersion
Version to be used for encoding (version used for decoding is determined by data received)
const KeepAliveTickDuration = 5 * time.Second //TODO from config
Variables ¶
Functions ¶
func DecodeVersionedBytes ¶
func DecodeVersionedBytes(res any, vData *pb.VersionedBytes) error
func EncodeVersionedBytes ¶
func EncodeVersionedBytes(data any, version uint32) (*pb.VersionedBytes, error)
func NewChainReaderServer ¶
func NewChainReaderServer(impl types.ChainReader) pb.ChainReaderServer
func NewChainReaderTestClient ¶
func NewChainReaderTestClient(conn *grpc.ClientConn) types.ChainReader
NewChainReaderTestClient is a test client for [types.ChainReader] internal users should instantiate a client directly and set all private fields
func NewCodecServer ¶
func NewCodecServer(impl types.Codec) pb.CodecServer
func NewCodecTestClient ¶
func NewCodecTestClient(conn *grpc.ClientConn) types.Codec
NewCodecTestClient is a test client for [types.Codec] internal users should instantiate a client directly and set all private fields
func NewTelemetryClient ¶
func NewTelemetryClient(client types.TelemetryService) *telemetryClient
func NewTelemetryServer ¶
func NewTelemetryServer(impl types.TelemetryService) *telemetryServer
func NewTelemetryServiceClient ¶
func NewTelemetryServiceClient(cc grpc.ClientConnInterface) *telemetryServiceClient
func RegisterPluginMedianServer ¶
func RegisterPluginMedianServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl types.PluginMedian) error
func RegisterPluginRelayerServer ¶
func RegisterPluginRelayerServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl PluginRelayer) error
func RegisterReportingPluginServiceServer ¶
func RegisterReportingPluginServiceServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl types.ReportingPluginClient) error
func RegisterStandAloneMedianProvider ¶
func RegisterStandAloneMedianProvider(s *grpc.Server, p types.MedianProvider)
RegisterStandAloneMedianProvider register the servers needed for a median plugin provider, this is a workaround to test the Node API on EVM until the EVM relayer is loopifyed
Types ¶
type AutomationProvider ¶
type AutomationProvider interface {
NewAutomationProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.AutomationProvider, error)
}
type Broker ¶
type Broker interface { Accept(id uint32) (net.Listener, error) DialWithOptions(id uint32, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error) NextId() uint32 }
Broker is a subset of the methods exported by *plugin.GRPCBroker.
type BrokerConfig ¶
BrokerConfig holds Broker configuration fields.
type ErrConfigDigestLen ¶
type ErrConfigDigestLen int
func (ErrConfigDigestLen) Error ¶
func (e ErrConfigDigestLen) Error() string
type ErrConnAccept ¶
func (ErrConnAccept) Error ¶
func (e ErrConnAccept) Error() string
func (ErrConnAccept) Unwrap ¶
func (e ErrConnAccept) Unwrap() error
type ErrConnDial ¶
func (ErrConnDial) Error ¶
func (e ErrConnDial) Error() string
func (ErrConnDial) Unwrap ¶
func (e ErrConnDial) Unwrap() error
type ErrUint8Bounds ¶
func (ErrUint8Bounds) Error ¶
func (e ErrUint8Bounds) Error() string
type FunctionsProvider ¶
type FunctionsProvider interface {
NewFunctionsProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.FunctionsProvider, error)
}
type GRPCClientConn ¶
type GRPCClientConn interface { // ClientConn returns the underlying client connection. ClientConn() grpc.ClientConnInterface }
GRPCClientConn is implemented by clients to expose their connection for efficient proxying.
type GRPCOpts ¶
type GRPCOpts struct { // Optionally include additional options when dialing a client. // Normally aligned with [plugin.ClientConfig.GRPCDialOptions]. DialOpts []grpc.DialOption // Optionally override the default *grpc.Server constructor. // Normally aligned with [plugin.ServeConfig.GRPCServer]. NewServer func([]grpc.ServerOption) *grpc.Server }
GRPCOpts has GRPC client and server options.
type MedianProvider ¶
type MedianProvider interface {
NewMedianProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.MedianProvider, error)
}
type MedianProviderServer ¶
type MedianProviderServer struct{}
func (MedianProviderServer) ConnToProvider ¶
func (m MedianProviderServer) ConnToProvider(conn grpc.ClientConnInterface, broker Broker, brokerCfg BrokerConfig) types.MedianProvider
type MercuryProvider ¶
type MercuryProvider interface {
NewMercuryProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.MercuryProvider, error)
}
type PluginMedianClient ¶
type PluginMedianClient struct {
// contains filtered or unexported fields
}
func NewPluginMedianClient ¶
func NewPluginMedianClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.ClientConn) *PluginMedianClient
func (PluginMedianClient) HealthReport ¶
func (*PluginMedianClient) NewMedianFactory ¶
func (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog types.ErrorLog) (types.ReportingPluginFactory, error)
func (PluginMedianClient) Refresh ¶
func (p PluginMedianClient) Refresh(broker Broker, conn *grpc.ClientConn)
type PluginProviderServer ¶
type PluginProviderServer struct{}
func (PluginProviderServer) ConnToProvider ¶
func (p PluginProviderServer) ConnToProvider(conn grpc.ClientConnInterface, broker Broker, brokerCfg BrokerConfig) types.PluginProvider
type PluginRelayer ¶
type PluginRelayerClient ¶
type PluginRelayerClient struct {
// contains filtered or unexported fields
}
func NewPluginRelayerClient ¶
func NewPluginRelayerClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.ClientConn) *PluginRelayerClient
func (*PluginRelayerClient) NewRelayer ¶
func (PluginRelayerClient) Refresh ¶
func (p PluginRelayerClient) Refresh(broker Broker, conn *grpc.ClientConn)
type PluginService ¶
type PluginService[P grpcPlugin, S services.Service] struct { services.StateMachine Service S // contains filtered or unexported fields }
pluginService is a [types.Service] wrapper that maintains an internal [types.Service] created from a [grpcPlugin] client instance by launching and re-launching as necessary.
func (*PluginService[P, S]) Close ¶
func (s *PluginService[P, S]) Close() error
func (*PluginService[P, S]) HealthReport ¶
func (s *PluginService[P, S]) HealthReport() map[string]error
func (*PluginService[P, S]) Name ¶
func (s *PluginService[P, S]) Name() string
func (*PluginService[P, S]) Ready ¶
func (s *PluginService[P, S]) Ready() error
func (*PluginService[P, S]) Wait ¶
func (s *PluginService[P, S]) Wait() error
Wait is the context-ignorant version of WaitCtx above.
func (*PluginService[P, S]) WaitCtx ¶
func (s *PluginService[P, S]) WaitCtx(ctx context.Context) error
WaitCtx waits for the service to start up until `ctx.Done` is triggered or it receives the stop signal.
func (*PluginService[P, S]) XXXTestHook ¶
func (s *PluginService[P, S]) XXXTestHook() TestPluginService[P, S]
XXXTestHook returns a TestPluginService. It must only be called once, and before Start.
type Relayer ¶
type Relayer interface { types.ChainService NewPluginProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.PluginProvider, error) }
Relayer extends [types.Relayer] and includes [context.Context]s.
type ReportingPluginServiceClient ¶
type ReportingPluginServiceClient struct {
// contains filtered or unexported fields
}
func NewReportingPluginServiceClient ¶
func NewReportingPluginServiceClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.ClientConn) *ReportingPluginServiceClient
func (ReportingPluginServiceClient) HealthReport ¶
func (*ReportingPluginServiceClient) NewReportingPluginFactory ¶
func (m *ReportingPluginServiceClient) NewReportingPluginFactory( ctx context.Context, config types.ReportingPluginServiceConfig, grpcProvider grpc.ClientConnInterface, pipelineRunner types.PipelineRunnerService, telemetry types.TelemetryService, errorLog types.ErrorLog, ) (types.ReportingPluginFactory, error)
func (ReportingPluginServiceClient) Refresh ¶
func (p ReportingPluginServiceClient) Refresh(broker Broker, conn *grpc.ClientConn)
type TestPluginService ¶
type TestPluginService[P grpcPlugin, S services.Service] chan<- func(*PluginService[P, S])
TestPluginService supports Killing & Resetting a running *pluginService.
func (TestPluginService[P, S]) Kill ¶
func (ch TestPluginService[P, S]) Kill()
func (TestPluginService[P, S]) Reset ¶
func (ch TestPluginService[P, S]) Reset()