service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arith

type Arith struct{}

Arith defines the struct of arith.

func (*Arith) Multiply

func (a *Arith) Multiply(req *ArithRequest, res *ArithResponse) error

Multiply operation

type ArithRequest

type ArithRequest struct {
	A int32
	B int32
}

ArithRequest defines the request of arith.

func (*ArithRequest) Marshal

func (a *ArithRequest) Marshal(buf []byte) ([]byte, error)

Marshal takes a buffer and encodes the ArithRequest to bytes

func (*ArithRequest) Unmarshal

func (a *ArithRequest) Unmarshal(b []byte) (uint64, error)

Unmarshal parses the encoded data.

type ArithResponse

type ArithResponse struct {
	Pro int32 //product
}

ArithResponse defines the response of arith.

func (*ArithResponse) Marshal

func (a *ArithResponse) Marshal(buf []byte) ([]byte, error)

Marshal takes a buffer and encodes the ArithResponse to bytes

func (*ArithResponse) Unmarshal

func (a *ArithResponse) Unmarshal(b []byte) (uint64, error)

Unmarshal parses the encoded data.

Jump to

Keyboard shortcuts

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