rpcwrap

package
v0.0.0-...-4754828 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2014 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthenticatedServer = rpc.NewServer()

AuthenticatedServer is an rpc.Server instance that serves authenticated calls.

Functions

func DialAuthHTTP

func DialAuthHTTP(network, address, user, password, codecName string, cFactory ClientCodecFactory, connectTimeout time.Duration, config *tls.Config) (conn *rpc.Client, err error)

DialAuthHTTP connects to an authenticated go HTTP RPC server using the specified codec and credentials. use 0 as connectTimeout for no timeout use nil as config to not use TLS

func DialHTTP

func DialHTTP(network, address, codecName string, cFactory ClientCodecFactory, connectTimeout time.Duration, config *tls.Config) (*rpc.Client, error)

DialHTTP connects to a go HTTP RPC server using the specified codec. use 0 as connectTimeout for no timeout use nil as config to not use TLS

func GetRpcPath

func GetRpcPath(codecName string, auth bool) string

func RegisterAuthenticated

func RegisterAuthenticated(rcvr interface{}) error

RegisterAuthenticated registers a receiver with the authenticated rpc server.

func ServeAuthRPC

func ServeAuthRPC(codecName string, cFactory ServerCodecFactory)

ServeAuthRPC handles authenticated rpc requests using the hijack scheme of rpc

func ServeRPC

func ServeRPC(codecName string, cFactory ServerCodecFactory)

ServeRPC handles rpc requests using the hijack scheme of rpc

Types

type BufferedConnection

type BufferedConnection struct {
	*bufio.Reader
	io.WriteCloser
	// contains filtered or unexported fields
}

func NewBufferedConnection

func NewBufferedConnection(conn io.ReadWriteCloser) *BufferedConnection

func (*BufferedConnection) Close

func (bc *BufferedConnection) Close() error

FIXME(sougou/szopa): Find a better way to track connection count.

type ClientCodecFactory

type ClientCodecFactory func(conn io.ReadWriteCloser) rpc.ClientCodec

type ServerCodecFactory

type ServerCodecFactory func(conn io.ReadWriteCloser) rpc.ServerCodec

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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