p2p

package
v0.1.1-fix-6-http-2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const UpdateSPDuration = 2

Variables

This section is empty.

Functions

This section is empty.

Types

type P2PConfig

type P2PConfig struct {
	SpOperatorAddress string
	GRPCAddress       string
	SignerGrpcAddress string
	SpDBConfig        *config.SQLDBConfig
	P2PConfig         *p2p.NodeConfig
}

type P2PServer

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

P2PServer p2p service

func NewP2PServer

func NewP2PServer(config *P2PConfig) (*P2PServer, error)

NewP2PServer return an instance of P2PServer

func (*P2PServer) GetApproval

GetApproval asks the approval to other SP.

func (*P2PServer) Name

func (p *P2PServer) Name() string

Name return the p2p server name, for the lifecycle management

func (*P2PServer) Start

func (p *P2PServer) Start(ctx context.Context) error

Start the p2p server background goroutine

func (*P2PServer) Stop

func (p *P2PServer) Stop(ctx context.Context) error

Stop the p2p server gRPC service and recycle the resources

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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