api

package
v0.0.0-...-4619e39 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRpcNodeServer

func RegisterRpcNodeServer(s *grpc.Server, srv RpcNodeServer)

Types

type RpcNodeClient

type RpcNodeClient interface {
	// 处理事务消息请求
	SendRequest(ctx context.Context, in *common.TxRequest, opts ...grpc.CallOption) (*common.TxResponse, error)
	// 处理消息订阅请求
	Subscribe(ctx context.Context, in *common.TxRequest, opts ...grpc.CallOption) (RpcNode_SubscribeClient, error)
	// 更新调试状态(开发调试)
	UpdateDebugConfig(ctx context.Context, in *config.DebugConfigRequest, opts ...grpc.CallOption) (*config.DebugConfigResponse, error)
	//  刷新日志级别配置
	RefreshLogLevelsConfig(ctx context.Context, in *config.LogLevelsRequest, opts ...grpc.CallOption) (*config.LogLevelsResponse, error)
	// 获取 perseus 版本
	GetPerseusVersion(ctx context.Context, in *config.PerseusVersionRequest, opts ...grpc.CallOption) (*config.PerseusVersionResponse, error)
	// 检查链配置并动态加载新链
	CheckNewBlockChainConfig(ctx context.Context, in *config.CheckNewBlockChainConfigRequest, opts ...grpc.CallOption) (*config.CheckNewBlockChainConfigResponse, error)
}

RpcNodeClient is the client API for RpcNode service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRpcNodeClient

func NewRpcNodeClient(cc *grpc.ClientConn) RpcNodeClient

type RpcNodeServer

type RpcNodeServer interface {
	// 处理事务消息请求
	SendRequest(context.Context, *common.TxRequest) (*common.TxResponse, error)
	// 处理消息订阅请求
	Subscribe(*common.TxRequest, RpcNode_SubscribeServer) error
	// 更新调试状态(开发调试)
	UpdateDebugConfig(context.Context, *config.DebugConfigRequest) (*config.DebugConfigResponse, error)
	//  刷新日志级别配置
	RefreshLogLevelsConfig(context.Context, *config.LogLevelsRequest) (*config.LogLevelsResponse, error)
	// 获取 perseus 版本
	GetPerseusVersion(context.Context, *config.PerseusVersionRequest) (*config.PerseusVersionResponse, error)
	// 检查链配置并动态加载新链
	CheckNewBlockChainConfig(context.Context, *config.CheckNewBlockChainConfigRequest) (*config.CheckNewBlockChainConfigResponse, error)
}

RpcNodeServer is the server API for RpcNode service.

type RpcNode_SubscribeClient

type RpcNode_SubscribeClient interface {
	Recv() (*common.SubscribeResult, error)
	grpc.ClientStream
}

type RpcNode_SubscribeServer

type RpcNode_SubscribeServer interface {
	Send(*common.SubscribeResult) error
	grpc.ServerStream
}

type UnimplementedRpcNodeServer

type UnimplementedRpcNodeServer struct {
}

UnimplementedRpcNodeServer can be embedded to have forward compatible implementations.

func (*UnimplementedRpcNodeServer) GetPerseusVersion

func (*UnimplementedRpcNodeServer) RefreshLogLevelsConfig

func (*UnimplementedRpcNodeServer) SendRequest

func (*UnimplementedRpcNodeServer) Subscribe

func (*UnimplementedRpcNodeServer) UpdateDebugConfig

Jump to

Keyboard shortcuts

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