payer

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Package payer implements the Payer API service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashKey added in v0.2.0

func HashKey(topic topic.Topic) uint32

HashKey hashes the topic to a stable uint16 hash

Types

type ClientManager added in v0.1.1

type ClientManager struct {
	// contains filtered or unexported fields
}

func NewClientManager added in v0.1.1

func NewClientManager(
	logger *zap.Logger,
	nodeRegistry registry.NodeRegistry,
	clientMetrics *grpcprom.ClientMetrics,
) *ClientManager

func (*ClientManager) GetClientConnection added in v1.0.0

func (c *ClientManager) GetClientConnection(nodeID uint32) (*grpc.ClientConn, error)

type NodeSelectorAlgorithm added in v0.2.0

type NodeSelectorAlgorithm interface {
	GetNode(topic topic.Topic, banlist ...[]uint32) (uint32, error)
}

type Service

type Service struct {
	payer_apiconnect.UnimplementedPayerApiHandler
	// contains filtered or unexported fields
}

func NewPayerAPIService added in v0.5.1

func NewPayerAPIService(
	ctx context.Context,
	logger *zap.Logger,
	nodeRegistry registry.NodeRegistry,
	payerPrivateKey *ecdsa.PrivateKey,
	blockchainPublisher blockchain.IBlockchainPublisher,
	clientMetrics *grpcprom.ClientMetrics,
	maxPayerMessageSize uint64,
) (*Service, error)

func (*Service) GetNodes added in v1.0.0

GetNodes returns the complete endpoint list of canonical nodes.

type StableHashingNodeSelectorAlgorithm added in v0.2.0

type StableHashingNodeSelectorAlgorithm struct {
	// contains filtered or unexported fields
}

func NewStableHashingNodeSelectorAlgorithm added in v0.2.0

func NewStableHashingNodeSelectorAlgorithm(
	reg registry.NodeRegistry,
) *StableHashingNodeSelectorAlgorithm

func (*StableHashingNodeSelectorAlgorithm) GetNode added in v0.2.0

func (s *StableHashingNodeSelectorAlgorithm) GetNode(
	topic topic.Topic,
	banlist ...[]uint32,
) (uint32, error)

GetNode selects a node for a given topic using stable hashing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL