rpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

rpc

Test

Error Case

panic: runtime error: invalid memory address or nil pointer dereference

  • client의 WithTimeout()에 설정된 시간이 초과되면 발생 : Check the client code

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRpcClient

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

func NewDefaultRpcClient

func NewDefaultRpcClient(address string) (*DefaultRpcClient, error)

func (*DefaultRpcClient) Close

func (c *DefaultRpcClient) Close()

func (*DefaultRpcClient) RunICode

func (c *DefaultRpcClient) RunICode(request *pb.Request) (*pb.Response, error)

todo test request -> request

type DefaultRpcServer

type DefaultRpcServer struct {
	Port    string
	Handler func(*cell.TxInfo) pb.Response
}

func NewDefaultRpcServer

func NewDefaultRpcServer(port string, handler func(*cell.TxInfo) pb.Response) *DefaultRpcServer

func (*DefaultRpcServer) RunICode

func (s *DefaultRpcServer) RunICode(ctx context.Context, request *pb.Request) (*pb.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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