gorpc

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *conf.Config, s *service.Service) (svr *rpc.Server)

New init rpc.

Types

type RPC

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

RPC represent rpc server

func (*RPC) Add

func (r *RPC) Add(c context.Context, arg *model.ArgHistory, res *struct{}) (err error)

Add (c context.Context, mid, src, rtime int64, ip string, h *model.History) (err error) .

func (*RPC) Clear

func (r *RPC) Clear(c context.Context, arg *model.ArgClear, res *struct{}) (err error)

Clear clear history

func (*RPC) Delete

func (r *RPC) Delete(c context.Context, arg *model.ArgDelete, res *struct{}) (err error)

Delete delete histories

func (*RPC) History

func (r *RPC) History(c context.Context, arg *model.ArgHistories, res *[]*model.Resource) (err error)

History return all history .

func (*RPC) HistoryCursor

func (r *RPC) HistoryCursor(c context.Context, arg *model.ArgCursor, res *[]*model.Resource) (err error)

HistoryCursor return all history .

func (*RPC) Ping

func (r *RPC) Ping(c context.Context, arg *struct{}, res *struct{}) (err error)

Ping check connection success.

func (*RPC) Position

func (r *RPC) Position(c context.Context, arg *model.ArgPos, res *model.History) (err error)

Position report a user hisotry.

func (*RPC) Progress

func (r *RPC) Progress(c context.Context, arg *model.ArgPro, res *map[int64]*model.History) (err error)

Progress report a user hisotry.

Jump to

Keyboard shortcuts

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