Help us shape the future of Go! Take the 2026 Go Developer Survey

rpc

package
v0.43.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Overview

Package rpc implements accepting transactions into the system. It implements a subset of the Observation API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// ProcessTransaction handles validating and ingesting a new transaction,
	// ultimately for inclusion in a future collection.
	ProcessTransaction(*flow.TransactionBody) error
}

Backend defines the core functionality required by the RPC API.

type Config

type Config struct {
	ListenAddr         string
	MaxRequestMsgSize  uint // in bytes
	MaxResponseMsgSize uint // in bytes
	RpcMetricsEnabled  bool // enable GRPC metrics

	// holds value of deprecated MaxMsgSize flag for use during bootstrapping.
	// will be removed in a future release.
	DeprecatedMaxMsgSize uint // in bytes
}

Config defines the configurable options for the ingress server.

type Engine

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

Engine implements a gRPC server with a simplified version of the Observation API to enable receiving transactions into the system.

func New

func New(
	config Config,
	backend Backend,
	log zerolog.Logger,
	chainID flow.ChainID,
	apiRatelimits map[string]int,
	apiBurstLimits map[string]int,
) *Engine

New returns a new ingress server.

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

Done returns a done channel that is closed once the module has fully stopped. It sends a signal to stop the gRPC server, then closes the channel.

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

Ready returns a ready channel that is closed once the module has fully started. The ingress module is ready when the gRPC server has successfully started.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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