Documentation ¶
Index ¶
- Variables
- func DefaultDialerFunc(address string) adapter.DialerFunc
- func DefaultTLSDialerFunc(address string, c *tls.Config, onTLSFail func()) adapter.DialerFunc
- func IsCertError(err error) bool
- func IsRPCServerError(err error) bool
- func NewGoRPCClient(address string, opts ...RPCClientOption) (adapter.Client, error)
- func NewGoRPCServer(opts ...RPCServerOption) adapter.Server
- type GoRPCClient
- func (g *GoRPCClient) Call(serviceMethod string, args any, reply any) (err error)
- func (g *GoRPCClient) CallWithConn(conn io.ReadWriteCloser, serviceMethod string, args any, reply any) error
- func (g *GoRPCClient) Close() error
- func (g *GoRPCClient) SetDialer(dialer adapter.DialerFunc)
- func (g *GoRPCClient) SetRPCServer(address string) error
- type GoRPCServer
- type PoolOptions
- type RPCClientOption
- type RPCServerOption
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DefaultDialerFunc ¶
func DefaultDialerFunc(address string) adapter.DialerFunc
func DefaultTLSDialerFunc ¶
func DefaultTLSDialerFunc(address string, c *tls.Config, onTLSFail func()) adapter.DialerFunc
func IsCertError ¶
func IsRPCServerError ¶
func NewGoRPCClient ¶
func NewGoRPCClient(address string, opts ...RPCClientOption) (adapter.Client, error)
func NewGoRPCServer ¶
func NewGoRPCServer(opts ...RPCServerOption) adapter.Server
Types ¶
type GoRPCClient ¶
type GoRPCClient struct {
// contains filtered or unexported fields
}
func (*GoRPCClient) Call ¶
func (g *GoRPCClient) Call(serviceMethod string, args any, reply any) (err error)
func (*GoRPCClient) CallWithConn ¶
func (g *GoRPCClient) CallWithConn(conn io.ReadWriteCloser, serviceMethod string, args any, reply any) error
func (*GoRPCClient) Close ¶
func (g *GoRPCClient) Close() error
func (*GoRPCClient) SetDialer ¶
func (g *GoRPCClient) SetDialer(dialer adapter.DialerFunc)
func (*GoRPCClient) SetRPCServer ¶
func (g *GoRPCClient) SetRPCServer(address string) error
type GoRPCServer ¶
func (*GoRPCServer) Accept ¶
func (s *GoRPCServer) Accept(l net.Listener)
func (*GoRPCServer) AddCert ¶
func (s *GoRPCServer) AddCert(cert []byte)
type PoolOptions ¶
type PoolOptions func(*connPool)
type RPCClientOption ¶
type RPCClientOption func(*GoRPCClient)
func WithCACert ¶
func WithCACert(cert []byte) RPCClientOption
func WithClientCert ¶
func WithClientCert(cert tls.Certificate) RPCClientOption
func WithClientDialer ¶
func WithClientDialer(dialer adapter.DialerFunc) RPCClientOption
func WithClientTLSConfig ¶
func WithClientTLSConfig(c *tls.Config) RPCClientOption
func WithTLSFail ¶
func WithTLSFail(f func()) RPCClientOption
type RPCServerOption ¶
type RPCServerOption func(*GoRPCServer)
func WithClientCA ¶
func WithClientCA(cert []byte) RPCServerOption
func WithServerCert ¶
func WithServerCert(cert tls.Certificate) RPCServerOption
func WithServerFinalizer ¶ added in v1.0.2
func WithServerFinalizer(m adapter.ServerFinalizer) RPCServerOption
func WithServerMiddleware ¶ added in v1.0.2
func WithServerMiddleware(m adapter.ServerMiddleware) RPCServerOption
func WithTLSConfig ¶
func WithTLSConfig(c *tls.Config) RPCServerOption
Click to show internal directories.
Click to hide internal directories.