rpc

package
v0.0.0-...-7d175ed Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(c config.RpcConfig)

Types

type CacheServer

type CacheServer struct{}

func (*CacheServer) Get

func (cs *CacheServer) Get(req []DataReq, resp *[]*DataResp) error

func (*CacheServer) Push

func (cs *CacheServer) Push(ps []models.Point, r *SimpleRpcResponse) error

type DataReq

type DataReq struct {
	Key  string `msg:"key"`
	From int64  `msg:"from"`
	To   int64  `msg:"to"`
	Step int    `msg:"step"`
	RRA  int    `msg:"rra"`
}

DataReq, 同query定义

type DataResp

type DataResp struct {
	// code == 0, normal
	// code >  0, exception
	Code int           `msg:"code"`
	Msg  string        `msg:"msg"`
	Key  string        `msg:"key"`
	From int64         `msg:"from"`
	To   int64         `msg:"to"`
	Step int           `msg:"step"`
	RRA  int           `msg:"rra"`
	Data []chunks.Iter `msg:"data"`
}

DataResp, 同query定义

type SimpleRpcResponse

type SimpleRpcResponse struct {
	// code == 0, normal
	// code >  0, exception
	Code int `msg:"code"`
}

SimpleRpcResponse 同transfer定义

Jump to

Keyboard shortcuts

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