clientrpc

package
v0.0.0-...-fea0aa2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxRequests = 100

Variables

This section is empty.

Functions

func Log

func Log(log string, recv bool)

Types

type Client

type Client struct {
	sync.Mutex

	Hostname string
	// contains filtered or unexported fields
}

func (*Client) AsyncDo

func (client *Client) AsyncDo(api string, req Request, res Response) error

func (*Client) Do

func (client *Client) Do(api string, req Request, res Response) error

type EmptyResponse

type EmptyResponse struct{}

func (*EmptyResponse) LogResponse

func (res *EmptyResponse) LogResponse(recv bool)

type Request

type Request interface {
	LogRequest(recv bool)
}

type Response

type Response interface {
	LogResponse(recv bool)
}

type WorkRequest

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

func NewWorkRequest

func NewWorkRequest(req Request, wg *sync.WaitGroup) *WorkRequest

func (*WorkRequest) GetRequest

func (wr *WorkRequest) GetRequest() Request

func (*WorkRequest) GetResult

func (wr *WorkRequest) GetResult() Response

func (*WorkRequest) GetWG

func (wr *WorkRequest) GetWG() *sync.WaitGroup

func (*WorkRequest) SetResult

func (wr *WorkRequest) SetResult(res Response)

Jump to

Keyboard shortcuts

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