{"modulePath":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay","version":"v0.0.0-20230622090102-3f0f60f3c385","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package internal\n\n## Functions\n\n```go\nfunc RegisterPluginMedianServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl PluginMedian) error\n```\n\n```go\nfunc RegisterPluginRelayerServer(server *grpc.Server, broker Broker, brokerCfg BrokerConfig, impl PluginRelayer) error\n```\n\n## Types\n\n```go\ntype Broker interface {\n\tAccept(id uint32) (net.Listener, error)\n\tDialWithOptions(id uint32, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error)\n\tNextId() uint32\n}\n```\nBroker is a subset of the methods exported by \\*plugin.GRPCBroker.\n\n```go\ntype BrokerConfig struct {\n\tStopCh \u003c-chan struct{}\n\tLogger logger.Logger\n\n\tGRPCOpts // optional\n}\n```\nBrokerConfig holds Broker configuration fields.\n\n```go\ntype ErrConfigDigestLen int\n```\n\n```go\nfunc (e ErrConfigDigestLen) Error() string\n```\n\n```go\ntype ErrConnAccept struct {\n\tID   uint32\n\tName string\n\tErr  error\n}\n```\n\n```go\nfunc (e ErrConnAccept) Error() string\n```\n\n```go\nfunc (e ErrConnAccept) Unwrap() error\n```\n\n```go\ntype ErrConnDial struct {\n\tID   uint32\n\tName string\n\tErr  error\n}\n```\n\n```go\nfunc (e ErrConnDial) Error() string\n```\n\n```go\nfunc (e ErrConnDial) Unwrap() error\n```\n\n```go\ntype ErrUint8Bounds struct {\n\tU    uint32\n\tName string\n}\n```\n\n```go\nfunc (e ErrUint8Bounds) Error() string\n```\n\n```go\ntype ErrorLog interface {\n\tSaveError(ctx context.Context, msg string) error\n}\n```\n\n```go\ntype GRPCOpts struct {\n\t// Optionally include additional options when dialing a client.\n\t// Normally aligned with [plugin.ClientConfig.GRPCDialOptions].\n\tDialOpts []grpc.DialOption\n\t// Optionally override the default *grpc.Server constructor.\n\t// Normally aligned with [plugin.ServeConfig.GRPCServer].\n\tNewServer func([]grpc.ServerOption) *grpc.Server\n}\n```\nGRPCOpts has GRPC client and server options.\n\n```go\ntype Keystore interface {\n\tAccounts(ctx context.Context) (accounts []string, err error)\n\t// Sign returns data signed by account.\n\t// nil data can be used as a no-op to check for account existence.\n\tSign(ctx context.Context, account string, data []byte) (signed []byte, err error)\n}\n```\n\n```go\ntype PluginMedian interface {\n\tNewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog ErrorLog) (ReportingPluginFactory, error)\n}\n```\n\n```go\ntype PluginMedianClient struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPluginMedianClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.ClientConn) *PluginMedianClient\n```\n\n```go\nfunc (s PluginMedianClient) Close() error\n```\n\n```go\nfunc (s PluginMedianClient) HealthReport() map[string]error\n```\n\n```go\nfunc (s PluginMedianClient) Name() string\n```\n\n```go\nfunc (m *PluginMedianClient) NewMedianFactory(ctx context.Context, provider types.MedianProvider, dataSource, juelsPerFeeCoin median.DataSource, errorLog ErrorLog) (ReportingPluginFactory, error)\n```\n\n```go\nfunc (s PluginMedianClient) Ready() error\n```\n\n```go\nfunc (p PluginMedianClient) Refresh(broker Broker, conn *grpc.ClientConn)\n```\n\n```go\nfunc (s PluginMedianClient) Start(ctx context.Context) error\n```\n\n```go\ntype PluginRelayer interface {\n\tNewRelayer(ctx context.Context, config string, keystore Keystore) (Relayer, error)\n}\n```\n\n```go\ntype PluginRelayerClient struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPluginRelayerClient(broker Broker, brokerCfg BrokerConfig, conn *grpc.ClientConn) *PluginRelayerClient\n```\n\n```go\nfunc (p *PluginRelayerClient) NewRelayer(ctx context.Context, config string, keystore Keystore) (Relayer, error)\n```\n\n```go\nfunc (p PluginRelayerClient) Refresh(broker Broker, conn *grpc.ClientConn)\n```\n\n```go\ntype Relayer interface {\n\ttypes.Service\n\n\tNewConfigProvider(context.Context, types.RelayArgs) (types.ConfigProvider, error)\n\tNewMedianProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.MedianProvider, error)\n\tNewMercuryProvider(context.Context, types.RelayArgs, types.PluginArgs) (types.MercuryProvider, error)\n\n\tChainStatus(ctx context.Context, id string) (types.ChainStatus, error)\n\tChainStatuses(ctx context.Context, offset, limit int) (chains []types.ChainStatus, count int, err error)\n\n\tNodeStatuses(ctx context.Context, offset, limit int, chainIDs ...string) (nodes []types.NodeStatus, count int, err error)\n\n\tSendTx(ctx context.Context, chainID, from, to string, amount *big.Int, balanceCheck bool) error\n}\n```\nRelayer extends \\[types.Relayer] and includes \\[context.Context]s.\n\n```go\ntype ReportingPluginFactory interface {\n\ttypes.Service\n\tlibocr.ReportingPluginFactory\n}\n```\n\n","path":"github.com/GoPlugin/pluginV2Lib/pluginV2-relay/pkg/loop/internal","name":"internal","synopsis":"","isRedistributable":true}
