clientlib

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultAPIClient = func() *client.Client {
	cl := client.New(nil)
	cl.RetryOpt.Tries = 100
	cl.RetryOpt.Interval = 100 * time.Millisecond
	cl.RetryOpt.Verbose = false
	return cl
}()

Functions

func APICallOrDie added in v0.6.0

func APICallOrDie(method, url string, in interface{}, out interface{})

func CircuitDialer

func CircuitDialer(
	skf func() (*servicekey.T, error),
	circuitf func() ([]*relayentry.T, error),
	dialf func(net.Conn, string, *url.URL, *wlnet.Init) (net.Conn, error),
) func(string, string) (net.Conn, error)

func ContractInfo added in v0.6.0

func ContractInfo(fm fsdir.T) (ci *contractinfo.T, err error)

func ContractURL added in v0.6.0

func ContractURL(fm fsdir.T) *texturl.URL

func GetContractInfo

func GetContractInfo(cl *client.Client, sc *texturl.URL) (info *contractinfo.T, rl relaylist.T, err error)

func JSONOrDie added in v0.6.0

func JSONOrDie(w io.Writer, x interface{})

NOTE: the intended usage of this function is that it should never fail if it does fail, that's an issue with the calling code

func SaveContractInfo

func SaveContractInfo(fm fsdir.T, ci *contractinfo.T, rl relaylist.T) (err error)

func TraceOrigin

func TraceOrigin(err error, circ circuit.T) (r *relayentry.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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