server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBridgeService added in v0.1.0

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

NewBridgeService creates new bridge service.

func RunServer

func RunServer(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 `mapstructure:"BridgeVersion"`
	// DB is the database config
	DB db.Config `mapstructure:"DB"`
}

Config struct

Jump to

Keyboard shortcuts

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