Documentation
¶
Index ¶
- type GRPCNodeServer
- func (s *GRPCNodeServer) GetBlocks(ctx context.Context, v *proto.Version) (*proto.Blocks, error)
- func (s *GRPCNodeServer) Handshake(ctx context.Context, v *proto.Version) (*proto.Version, error)
- func (s *GRPCNodeServer) NewBlock(ctx context.Context, b *proto.Block) (*proto.Block, error)
- func (s *GRPCNodeServer) NewTransaction(ctx context.Context, t *proto.Transaction) (*proto.Transaction, error)
- func (s *GRPCNodeServer) Serve() error
- func (s *GRPCNodeServer) Stop()
- func (s *GRPCNodeServer) String() string
- type MetricsMiddleware
- func (m *MetricsMiddleware) GetBlocks(ctx context.Context, v *proto.Version) (_ *proto.Blocks, err error)
- func (m *MetricsMiddleware) Handshake(ctx context.Context, v *proto.Version) (_ *proto.Version, err error)
- func (m *MetricsMiddleware) NewBlock(ctx context.Context, b *proto.Block) (_ *proto.Block, err error)
- func (m *MetricsMiddleware) NewTransaction(ctx context.Context, t *proto.Transaction) (_ *proto.Transaction, err error)
- func (m *MetricsMiddleware) String() string
- type NodeServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCNodeServer ¶
type GRPCNodeServer struct { proto.UnimplementedNodeServer // contains filtered or unexported fields }
func NewGRPCNodeServer ¶
func NewGRPCNodeServer(node service.Noder, nodeListenAddr string) *GRPCNodeServer
func (*GRPCNodeServer) NewTransaction ¶
func (s *GRPCNodeServer) NewTransaction(ctx context.Context, t *proto.Transaction) (*proto.Transaction, error)
func (*GRPCNodeServer) Serve ¶
func (s *GRPCNodeServer) Serve() error
func (*GRPCNodeServer) Stop ¶
func (s *GRPCNodeServer) Stop()
func (*GRPCNodeServer) String ¶
func (s *GRPCNodeServer) String() string
type MetricsMiddleware ¶
type MetricsMiddleware struct {
// contains filtered or unexported fields
}
MetricsMiddleware is a middleware that collects metrics about node's it wraps the NodeServer interface
func (*MetricsMiddleware) NewTransaction ¶
func (m *MetricsMiddleware) NewTransaction( ctx context.Context, t *proto.Transaction, ) (_ *proto.Transaction, err error)
func (*MetricsMiddleware) String ¶
func (m *MetricsMiddleware) String() string
type NodeServer ¶
type NodeServer interface { Handshake(ctx context.Context, v *proto.Version) (*proto.Version, error) NewTransaction(ctx context.Context, t *proto.Transaction) (*proto.Transaction, error) NewBlock(ctx context.Context, b *proto.Block) (*proto.Block, error) GetBlocks(ctx context.Context, v *proto.Version) (*proto.Blocks, error) String() string }
func NewMetricsMiddleware ¶
func NewMetricsMiddleware(next NodeServer) NodeServer
Click to show internal directories.
Click to hide internal directories.