service

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = 0
	FAIL    = 1
)
View Source
const (
	NodeKey = "nodeKey_%v"
)

Variables

This section is empty.

Functions

func NewTaskHandler

func NewTaskHandler(cfg *config.Config, log *xlog.XLog) taskapi.TaskApiInterface

Types

type Server

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

func NewServer

func NewServer(cfg *config.Config, blockChain []int64, log *xlog.XLog) *Server

func (*Server) Error

func (s *Server) Error(c *gin.Context, path string, err string)

func (*Server) ExistNodeId

func (s *Server) ExistNodeId(blockChainCode int64, nodeId string) bool

func (*Server) PushBlockTask

func (s *Server) PushBlockTask(c *gin.Context)

func (*Server) PushReceiptTask

func (s *Server) PushReceiptTask(c *gin.Context)

func (*Server) PushReceiptsTask

func (s *Server) PushReceiptsTask(c *gin.Context)

func (*Server) PushTxTask

func (s *Server) PushTxTask(c *gin.Context)

func (*Server) PushTxsTask

func (s *Server) PushTxsTask(c *gin.Context)

func (*Server) Success

func (s *Server) Success(c *gin.Context, resp interface{}, path string)

type TaskHandler

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

func (*TaskHandler) SendNodeTask

func (m *TaskHandler) SendNodeTask(task *taskapi.NodeTask) error

Jump to

Keyboard shortcuts

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