node

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: CC0-1.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPathPrefix string = "*"
)

Functions

This section is empty.

Types

type Config

type Config struct {
	HttpPort           int16         `mapstructure:"httpPort"`
	HttpHost           string        `mapstructure:"httpHost"`
	HttpCors           []string      `mapstructure:"httpCors"`
	HttpCompress       bool          `mapstructure:"httpCompress"`
	HttpTimeout        time.Duration `mapstructure:"httpTimeout"`
	HttpPathPrefix     string        `mapstructure:"httpPathPrefix"`
	WsPort             int16         `mapstructure:"wsPort"`
	WsHost             string        `mapstructure:"wsHost"`
	WsPathPrefix       string        `mapstructure:"wsPathPrefix"`
	WsHandshakeTimeout time.Duration `mapstructure:"wsHandshakeTimeout"`
	MaxBatchRequests   uint          `mapstructure:"maxBatchRequests"`
}

func GetConfig

func GetConfig() *Config

type RpcNode

type RpcNode struct {
	rpc.RpcServer
	Broker broker.Broker
}

func New

func New() (*RpcNode, error)

func NewWithConf

func NewWithConf(config *Config) (*RpcNode, error)

func (*RpcNode) Start

func (n *RpcNode) Start()

Start starts RPC server as a seperate go routine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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