rpc

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

README

RPC

Lint Test codecov Go Report Card

性能测试
import _ "net/http/pprof"


go func() {
	log.Println(http.ListenAndServe("localhost:6060", nil))
}()
install graphviz
$ sudo brew install graphviz

look at a 30-second CPU profile:
$ curl "http://localhost:6060/debug/pprof/profile?seconds=10" -o cpu.prof
$ go tool pprof -web cpu.prof
golint
$ go get -u golang.org/x/lint/golint
$ golint ./...
go fmt
$ go fmt ./...
calculate lines of code
$ git ls-files -- '*.go' ':!:*_test.go' | xargs wc -l
Problems
How to avoid session flood
参考

https://github.com/tslearn/rpc-cluster-go/tree/984c4a17ffd777b268a13c0506aef83d9ba6b15d

ssl 安全测试 https://www.ssllabs.com/ssltest/

Documentation

Overview

Package rpc provides the necessary structs and functions required to use rpc service.

The full document is located at https://github.com/rpccloud/rpc/blob/master/doc/rpc/index.md

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTLSClientConfig

func GetTLSClientConfig(
	verifyServerCert bool,
	caFiles []string,
) (*tls.Config, error)

GetTLSClientConfig ...

func GetTLSServerConfig

func GetTLSServerConfig(certFile string, keyFile string) (*tls.Config, error)

GetTLSServerConfig ...

Types

type ActionCache

type ActionCache = rpc.ActionCache

ActionCache ...

type ActionCacheFunc

type ActionCacheFunc = rpc.ActionCacheFunc

ActionCacheFunc ...

type Any

type Any = rpc.Any

Any common Any type

type Array

type Array = rpc.Array

Array common Array type

type Bool

type Bool = rpc.Bool

Bool ...

type Bytes

type Bytes = rpc.Bytes

Bytes ...

type Client

type Client = client.Client

Client ...

func Dial

func Dial(network string, addr string) *Client

Dial ...

func DialTLS

func DialTLS(network string, addr string, tlsConfig *tls.Config) *Client

DialTLS ...

type Float64

type Float64 = rpc.Float64

Float64 ...

type Int64

type Int64 = rpc.Int64

Int64 ...

type Map

type Map = rpc.Map

Map common Map type

type RTArray

type RTArray = rpc.RTArray

RTArray ...

type RTMap

type RTMap = rpc.RTMap

RTMap ...

type RTValue

type RTValue = rpc.RTValue

RTValue ...

type Return

type Return = rpc.Return

Return ...

type Runtime

type Runtime = rpc.Runtime

Runtime ...

type Server

type Server = server.Server

Server ...

func NewServer

func NewServer() *Server

NewServer ...

type Service

type Service = rpc.Service

Service ...

func NewService

func NewService() *Service

NewService ...

type Stream

type Stream = rpc.Stream

Stream ...

type String

type String = rpc.String

String ...

type Uint64

type Uint64 = rpc.Uint64

Uint64 ...

Directories

Path Synopsis
internal
adapter
Package adapter ...
Package adapter ...
base
Package base ...
Package base ...
client
Package client ...
Package client ...
gateway
Package gateway ...
Package gateway ...
rpc
Package rpc ...
Package rpc ...
server
Package server ...
Package server ...

Jump to

Keyboard shortcuts

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