client

package module
v0.0.0-...-6edd512 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call[Req any, Resp any](client *UnixRPC, method string, data Req) (Resp, error)

Call invoke a JSON RPC 2.0 method call by choosing a random id from 0 to 10000

Types

type TestTracer

type TestTracer struct{}

func (*TestTracer) Info

func (self *TestTracer) Info(msg string)

func (*TestTracer) Infof

func (self *TestTracer) Infof(msg string, args ...any)

func (*TestTracer) Log

func (self *TestTracer) Log(level tracer.TracerLevel, msg string)

func (*TestTracer) Logf

func (self *TestTracer) Logf(level tracer.TracerLevel, msg string, args ...any)

func (*TestTracer) Trace

func (self *TestTracer) Trace(msg string)

func (*TestTracer) Tracef

func (self *TestTracer) Tracef(msg string, args ...any)

type UnixRPC

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

func NewUnix

func NewUnix(path string) (*UnixRPC, error)

NewUnixRPC creates a new UnixRPC instance.

func (*UnixRPC) SetEncoder

func (self *UnixRPC) SetEncoder(encoder encoder.JSONEncoder)

func (*UnixRPC) SetTracer

func (self *UnixRPC) SetTracer(tracer tracer.Tracer)

Jump to

Keyboard shortcuts

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