node

package
v0.3.1-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeManager_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yuhaiin.protos.grpc.node.node_manager",
	HandlerType: (*NodeManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "now",
			Handler:    _NodeManager_Now_Handler,
		},
		{
			MethodName: "use",
			Handler:    _NodeManager_Use_Handler,
		},
		{
			MethodName: "get_node",
			Handler:    _NodeManager_GetNode_Handler,
		},
		{
			MethodName: "save_node",
			Handler:    _NodeManager_SaveNode_Handler,
		},
		{
			MethodName: "delete_node",
			Handler:    _NodeManager_DeleteNode_Handler,
		},
		{
			MethodName: "get_manager",
			Handler:    _NodeManager_GetManager_Handler,
		},
		{
			MethodName: "save_links",
			Handler:    _NodeManager_SaveLinks_Handler,
		},
		{
			MethodName: "delete_links",
			Handler:    _NodeManager_DeleteLinks_Handler,
		},
		{
			MethodName: "update_links",
			Handler:    _NodeManager_UpdateLinks_Handler,
		},
		{
			MethodName: "get_links",
			Handler:    _NodeManager_GetLinks_Handler,
		},
		{
			MethodName: "latency",
			Handler:    _NodeManager_Latency_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc/node/node.proto",
}

NodeManager_ServiceDesc is the grpc.ServiceDesc for NodeManager service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterNodeManagerServer

func RegisterNodeManagerServer(s grpc.ServiceRegistrar, srv NodeManagerServer)

Types

type NodeManagerClient

type NodeManagerClient interface {
	Now(ctx context.Context, in *node.NowReq, opts ...grpc.CallOption) (*node.Point, error)
	// use req is hash string of point
	Use(ctx context.Context, in *node.UseReq, opts ...grpc.CallOption) (*node.Point, error)
	GetNode(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*node.Point, error)
	SaveNode(ctx context.Context, in *node.Point, opts ...grpc.CallOption) (*node.Point, error)
	DeleteNode(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetManager(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*node.Manager, error)
	SaveLinks(ctx context.Context, in *node.SaveLinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	DeleteLinks(ctx context.Context, in *node.LinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	UpdateLinks(ctx context.Context, in *node.LinkReq, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetLinks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*node.GetLinksResp, error)
	Latency(ctx context.Context, in *node.LatencyReq, opts ...grpc.CallOption) (*node.LatencyResp, error)
}

NodeManagerClient is the client API for NodeManager service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type NodeManagerServer

type NodeManagerServer interface {
	Now(context.Context, *node.NowReq) (*node.Point, error)
	// use req is hash string of point
	Use(context.Context, *node.UseReq) (*node.Point, error)
	GetNode(context.Context, *wrapperspb.StringValue) (*node.Point, error)
	SaveNode(context.Context, *node.Point) (*node.Point, error)
	DeleteNode(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
	GetManager(context.Context, *wrapperspb.StringValue) (*node.Manager, error)
	SaveLinks(context.Context, *node.SaveLinkReq) (*emptypb.Empty, error)
	DeleteLinks(context.Context, *node.LinkReq) (*emptypb.Empty, error)
	UpdateLinks(context.Context, *node.LinkReq) (*emptypb.Empty, error)
	GetLinks(context.Context, *emptypb.Empty) (*node.GetLinksResp, error)
	Latency(context.Context, *node.LatencyReq) (*node.LatencyResp, error)
	// contains filtered or unexported methods
}

NodeManagerServer is the server API for NodeManager service. All implementations must embed UnimplementedNodeManagerServer for forward compatibility

type UnimplementedNodeManagerServer

type UnimplementedNodeManagerServer struct {
}

UnimplementedNodeManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedNodeManagerServer) DeleteNode

func (UnimplementedNodeManagerServer) GetManager

func (UnimplementedNodeManagerServer) GetNode

func (UnimplementedNodeManagerServer) Latency

func (UnimplementedNodeManagerServer) Now

func (UnimplementedNodeManagerServer) SaveNode

func (UnimplementedNodeManagerServer) Use

type UnsafeNodeManagerServer

type UnsafeNodeManagerServer interface {
	// contains filtered or unexported methods
}

UnsafeNodeManagerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeManagerServer will result in compilation errors.

Jump to

Keyboard shortcuts

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