{"modulePath":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay","version":"v0.0.0-20230622090102-3f0f60f3c385","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package loop\n\n## Constants\n\n```go\nconst PluginMedianName = \"median\"\n```\nPluginMedianName is the name for [PluginMedian](#PluginMedian)/\\[NewGRPCPluginMedian].\n\n```go\nconst PluginRelayerName = \"relayer\"\n```\nPluginRelayerName is the name for [PluginRelayer](#PluginRelayer)/\\[NewGRPCPluginRelayer].\n\n## Variables\n\n```go\nvar ErrPluginUnavailable = errors.New(\"plugin unavailable\")\n```\n\n## Functions\n\n```go\nfunc HCLogLogger(l logger.Logger) hclog.Logger\n```\nHCLogLogger returns an [hclog.Logger](/github.com/hashicorp/go-hclog#Logger) backed by the given [logger.Logger](/github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/logger#Logger).\n\n```go\nfunc NewLogger() (logger.Logger, error)\n```\nNewLogger returns a new [logger.Logger](/github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/logger#Logger) configured to encode [hclog](/github.com/hashicorp/go-hclog) compatible JSON.\n\n```go\nfunc PluginMedianHandshakeConfig() plugin.HandshakeConfig\n```\n\n```go\nfunc PluginRelayerHandshakeConfig() plugin.HandshakeConfig\n```\n\n## Types\n\n```go\ntype BrokerConfig = internal.BrokerConfig\n```\n\n```go\ntype ContextValues struct {\n\tJobID   any\n\tJobName any\n\n\tContractID    any\n\tFeedID        any\n\tTransmitterID any\n}\n```\nContextValues is a helper for passing values via a [context.Context](/context#Context).\n\n```go\nfunc (v *ContextValues) Args() (a []any)\n```\nArgs returns a slice of args to pass to [logger.Logger.With](/github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/logger#Logger.With).\n\n```go\nfunc (v *ContextValues) ContextWithValues(ctx context.Context) context.Context\n```\nContextWithValues returns a context.Context with values set from v.\n\n```go\nfunc (v *ContextValues) SetValues(ctx context.Context)\n```\nSetValues sets v to values from the ctx.\n\n```go\ntype ErrorLog = internal.ErrorLog\n```\n\n```go\ntype GRPCOpts = internal.GRPCOpts\n```\n\n```go\nfunc SetupTelemetry(registerer prometheus.Registerer) GRPCOpts\n```\nSetupTelemetry initializes open telemetry and returns GRPCOpts with telemetry interceptors.\n\n```go\ntype GRPCPluginMedian struct {\n\tplugin.NetRPCUnsupportedPlugin\n\n\tBrokerConfig\n\n\tPluginServer PluginMedian\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (p *GRPCPluginMedian) ClientConfig() *plugin.ClientConfig\n```\n\n```go\nfunc (p *GRPCPluginMedian) GRPCClient(_ context.Context, broker *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)\n```\nGRPCClient implements [plugin.GRPCPlugin](/github.com/hashicorp/go-plugin#GRPCPlugin) and returns the pluginClient [PluginMedian](#PluginMedian), updated with the new broker and conn.\n\n```go\nfunc (p *GRPCPluginMedian) GRPCServer(broker *plugin.GRPCBroker, server *grpc.Server) error\n```\n\n```go\ntype GRPCPluginRelayer struct {\n\tplugin.NetRPCUnsupportedPlugin\n\n\tBrokerConfig\n\n\tPluginServer PluginRelayer\n\t// contains filtered or unexported fields\n}\n```\nGRPCPluginRelayer implements [plugin.GRPCPlugin](/github.com/hashicorp/go-plugin#GRPCPlugin) for [PluginRelayer](#PluginRelayer).\n\n```go\nfunc (p *GRPCPluginRelayer) ClientConfig() *plugin.ClientConfig\n```\n\n```go\nfunc (p *GRPCPluginRelayer) GRPCClient(_ context.Context, broker *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)\n```\nGRPCClient implements [plugin.GRPCPlugin](/github.com/hashicorp/go-plugin#GRPCPlugin) and returns the pluginClient [PluginRelayer](#PluginRelayer), updated with the new broker and conn.\n\n```go\nfunc (p *GRPCPluginRelayer) GRPCServer(broker *plugin.GRPCBroker, server *grpc.Server) error\n```\n\n```go\ntype Keystore = internal.Keystore\n```\n\n```go\ntype MedianService struct {\n\t// contains filtered or unexported fields\n}\n```\nMedianService is a [types.Service](/github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/types#Service) that maintains an internal [PluginMedian](#PluginMedian).\n\n```go\nfunc NewMedianService(lggr logger.Logger, grpcOpts GRPCOpts, cmd func() *exec.Cmd, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog ErrorLog) *MedianService\n```\nNewMedianService returns a new [\\*MedianService](#MedianService). cmd must return a new exec.Cmd each time it is called.\n\n```go\nfunc (s *MedianService) Close() error\n```\n\n```go\nfunc (s *MedianService) HealthReport() map[string]error\n```\n\n```go\nfunc (s *MedianService) Name() string\n```\n\n```go\nfunc (m *MedianService) NewReportingPlugin(config ocrtypes.ReportingPluginConfig) (ocrtypes.ReportingPlugin, ocrtypes.ReportingPluginInfo, error)\n```\n\n```go\nfunc (s *MedianService) Ready() error\n```\n\n```go\nfunc (s *MedianService) Start(context.Context) error\n```\n\n```go\ntype PluginMedian = internal.PluginMedian\n```\n\n```go\ntype PluginRelayer = internal.PluginRelayer\n```\n\n```go\ntype Relayer = internal.Relayer\n```\n\n```go\ntype RelayerService struct {\n\t// contains filtered or unexported fields\n}\n```\nRelayerService is a [types.Service](/github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/types#Service) that maintains an internal [Relayer](#Relayer).\n\n```go\nfunc NewRelayerService(lggr logger.Logger, grpcOpts GRPCOpts, cmd func() *exec.Cmd, config string, keystore Keystore) *RelayerService\n```\nNewRelayerService returns a new [\\*RelayerService](#RelayerService). cmd must return a new exec.Cmd each time it is called.\n\n```go\nfunc (r *RelayerService) ChainStatus(ctx context.Context, id string) (types.ChainStatus, error)\n```\n\n```go\nfunc (r *RelayerService) ChainStatuses(ctx context.Context, offset, limit int) (chains []types.ChainStatus, count int, err error)\n```\n\n```go\nfunc (s *RelayerService) Close() error\n```\n\n```go\nfunc (s *RelayerService) HealthReport() map[string]error\n```\n\n```go\nfunc (s *RelayerService) Name() string\n```\n\n```go\nfunc (r *RelayerService) NewConfigProvider(ctx context.Context, args types.RelayArgs) (types.ConfigProvider, error)\n```\n\n```go\nfunc (r *RelayerService) NewMedianProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MedianProvider, error)\n```\n\n```go\nfunc (r *RelayerService) NewMercuryProvider(ctx context.Context, rargs types.RelayArgs, pargs types.PluginArgs) (types.MercuryProvider, error)\n```\n\n```go\nfunc (r *RelayerService) NodeStatuses(ctx context.Context, offset, limit int, chainIDs ...string) (nodes []types.NodeStatus, count int, err error)\n```\n\n```go\nfunc (s *RelayerService) Ready() error\n```\n\n```go\nfunc (r *RelayerService) SendTx(ctx context.Context, chainID, from, to string, amount *big.Int, balanceCheck bool) error\n```\n\n```go\nfunc (s *RelayerService) Start(context.Context) error\n```\n\n```go\ntype ReportingPluginFactory = internal.ReportingPluginFactory\n```\n\n","path":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/loop","name":"loop","synopsis":"","isRedistributable":true}
