grpc

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 36 Imported by: 0

README

gRPC

This directory contains required files for gRPC service.

In order to compile pactus.proto file, run this command:

make proto

gRPC-gateway

Pactus utilizes the gRPC-gateway to transform gRPC services into RESTful APIs, accompanied by a Swagger UI.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable  bool          `toml:"enable"`
	Listen  string        `toml:"listen"`
	Gateway GatewayConfig `toml:"gateway"`
}

func DefaultConfig

func DefaultConfig() *Config

type GatewayConfig

type GatewayConfig struct {
	Enable     bool   `toml:"enable"`
	Listen     string `toml:"listen"`
	EnableCORS bool   `toml:"enable_cors"`
}

type Server

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

func NewServer

func NewServer(conf *Config, st state.Facade, syn sync.Synchronizer,
	n network.Network, consMgr consensus.ManagerReader,
) *Server

func (*Server) Address

func (s *Server) Address() string

func (*Server) StartServer

func (s *Server) StartServer() error

func (*Server) StopServer

func (s *Server) StopServer()

Directories

Path Synopsis
gen
go
Package pactus is a reverse proxy.
Package pactus is a reverse proxy.

Jump to

Keyboard shortcuts

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