server

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBridgeService

func NewBridgeService(cfg Config, height uint8, networks []uint32, storage interface{}) *bridgeService

NewBridgeService creates new bridge service.

func RunServer

func RunServer(ctx context.Context, cfg Config, bridgeService pb.BridgeServiceServer) error

RunServer runs gRPC server and HTTP gateway

Types

type Config

type Config struct {
	// GRPCPort is TCP port to listen by gRPC server
	GRPCPort string `mapstructure:"GRPCPort"`
	// HTTPPort is TCP port to listen by HTTP/REST gateway
	HTTPPort string `mapstructure:"HTTPPort"`
	// CacheSize is the buffer size of the lru-cache
	CacheSize int `mapstructure:"CacheSize"`
	// DefaultPageLimit is the default page limit for pagination
	DefaultPageLimit uint32 `mapstructure:"DefaultPageLimit"`
	// MaxPageLimit is the maximum page limit for pagination
	MaxPageLimit uint32 `mapstructure:"MaxPageLimit"`
	// Version is the version of the bridge service
	BridgeVersion string
	// FinalizedGEREnabled is used to compute the MT proofs based on the finalized GERs
	FinalizedGEREnabled bool `mapstructure:"FinalizedGEREnabled"`
	// DB is the database config
	DB db.Config `mapstructure:"DB"`
}

Config struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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