grpc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 31 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 is using gRPC-gateway to generate REST apis and 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, state state.Facade, sync sync.Synchronizer,
	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