rpc

package module
v0.0.8 Latest Latest
Warning

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

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

README

RPC

Lint Test codecov Go Report Card CodeFactor

开发相关

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

go func() {
	log.Println(http.ListenAndServe("localhost:6060", nil))
}()
$ sudo brew install graphviz
$ curl "http://localhost:6060/debug/pprof/profile?seconds=10" -o cpu.prof
$ go tool pprof -web cpu.prof
Problems

1 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 struct 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 GetClientTLSConfig added in v0.0.3

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

GetClientTLSConfig ...

func GetServerTLSConfig added in v0.0.3

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

GetServerTLSConfig ...

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 NewClient added in v0.0.2

func NewClient(
	network string,
	addr string,
	path string,
	tlsConfig *tls.Config,
	rBufSize int,
	wBufSize int,
	onError func(err *base.Error),
) *Client

NewClient ...

type Float64

type Float64 = rpc.Float64

Float64 ...

type IStreamReceiver added in v0.0.2

type IStreamReceiver = rpc.IStreamReceiver

IStreamReceiver ...

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(config *ServerConfig) *Server

NewServer ...

type ServerConfig added in v0.0.2

type ServerConfig = server.ServerConfig

ServerConfig ...

func GetDefaultServerConfig added in v0.0.2

func GetDefaultServerConfig() *ServerConfig

GetDefaultServerConfig ...

type Service

type Service = rpc.Service

Service ...

func NewService

func NewService(config rpc.Map) *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 ...
metrics
Package metrics ...
Package metrics ...
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