server

package
v0.0.0-...-e589de2 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(scFilePath string)

Run ..

Types

type Service

type Service struct {
	SectorIDLk sync.RWMutex // 对应RPC调用GetSectorID,返回miner的sectorid
	SectorID   uint64
	SCFilePath string

	HeightLk sync.RWMutex
	Height   int64
}

Service 定义我们的服务

func (*Service) GetHeight

func (s *Service) GetHeight(ctx context.Context, req *pb.HeightRequest) (*pb.HeightResponse, error)

GetHeight 实现 GetHeight 方法

func (*Service) GetSectorID

func (s *Service) GetSectorID(ctx context.Context, req *pb.SectorIDRequest) (*pb.SectorIDResponse, error)

GetSectorID 实现 GetSectorID 方法

func (*Service) WriteSectorID

func (s *Service) WriteSectorID()

WriteSectorID 实现 WriteSectorID 方法

Jump to

Keyboard shortcuts

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