xrpc

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

功能:client 说明:

功能:定义 说明:

功能:server 说明:

Index

Constants

View Source
const (
	TCP = "tcp"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(service_name string, addr1 string, addr2 string) error

func NewServer

func NewServer(service_name string, addr string) error

addr形式: "localhost:8972"

Types

type Args

type Args struct {
	Top_up_amount float64 // 充值额度
	User_id       string  //用户id
}

type Deposit

type Deposit int

func (*Deposit) Top_up

func (d *Deposit) Top_up(ctx context.Context, args *Args, reply *Reply) error

充值

type Reply

type Reply struct {
	OK bool //是否成功
}

Jump to

Keyboard shortcuts

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