proxy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardCall

func ForwardCall(clientQuery []byte) ([]byte, error)

ForwardCall takes a raw client request, passes it over to the daemon and returns daemon response.

Example:

body, err := ioutil.ReadAll(req.Body)
if err != nil {
	log.Panicf("error: ", err.Error())
}
lbrynetResponse, err := proxy.ForwardCall(body)

func InitResponseCache added in v0.5.0

func InitResponseCache(c ResponseCache)

InitResponseCache initializes module-level responseCache variable

Types

type ResponseCache added in v0.5.0

type ResponseCache interface {
	Save(method string, params interface{}, r interface{})
	Retrieve(method string, params interface{}) interface{}
	Count() int
	// contains filtered or unexported methods
}

ResponseCache interface describes methods for SDK response cache saving and retrieval

Jump to

Keyboard shortcuts

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