rpc

package
v0.5.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructModule

func ConstructModule(tp node.Type, cfg *Config) fx.Option

func Flags

func Flags() *flag.FlagSet

Flags gives a set of hardcoded node/rpc package flags.

func ParseFlags

func ParseFlags(cmd *cobra.Command, cfg *Config)

ParseFlags parses RPC flags from the given cmd and saves them to the passed config.

func RegisterEndpoints added in v0.5.0

func RegisterEndpoints(
	state state.Module,
	share share.Module,
	fraud fraud.Module,
	header header.Module,
	daser das.Module,
	serv *rpc.Server,
)

RegisterEndpoints registers the given services on the rpc.

func Server added in v0.5.0

func Server(cfg *Config) *rpc.Server

Types

type Config added in v0.5.0

type Config struct {
	Address string
	Port    string
}

func DefaultConfig added in v0.5.0

func DefaultConfig() Config

func (*Config) Validate added in v0.5.0

func (cfg *Config) Validate() error

Jump to

Keyboard shortcuts

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