Documentation ¶
Index ¶
- Variables
- func DialAuthHTTP(network, address, user, password, codecName string, ...) (conn *rpc.Client, err error)
- func DialHTTP(network, address, codecName string, cFactory ClientCodecFactory, ...) (*rpc.Client, error)
- func GetHttpPath(codecName string) string
- func GetRpcPath(codecName string, auth bool) string
- func RegisterAuthenticated(rcvr interface{}) error
- func ServeAuthRPC(codecName string, cFactory ServerCodecFactory)
- func ServeHTTP(codecName string, cFactory ServerCodecFactory)
- func ServeRPC(codecName string, cFactory ServerCodecFactory)
- type BufferedConnection
- type ClientCodecFactory
- type ServerCodecFactory
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) (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
func DialHTTP ¶
func DialHTTP(network, address, codecName string, cFactory ClientCodecFactory, connectTimeout time.Duration) (*rpc.Client, error)
DialHTTP connects to a go HTTP RPC server using the specified codec. use 0 as connectTimeout for no timeout
func GetHttpPath ¶
func GetRpcPath ¶
func RegisterAuthenticated ¶
func RegisterAuthenticated(rcvr interface{}) error
RegisterAuthenticated registers a receiver with the authenticated rpc server.
func ServeAuthRPC ¶
func ServeAuthRPC(codecName string, cFactory ServerCodecFactory)
ServeRPC handles rpc requests using the hijack scheme of rpc
func ServeHTTP ¶
func ServeHTTP(codecName string, cFactory ServerCodecFactory)
ServeHTTP handles rpc requests in HTTP compliant POST form
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 }
func NewBufferedConnection ¶
func NewBufferedConnection(conn io.ReadWriteCloser) *BufferedConnection
type ClientCodecFactory ¶
type ClientCodecFactory func(conn io.ReadWriteCloser) rpc.ClientCodec
type ServerCodecFactory ¶
type ServerCodecFactory func(conn io.ReadWriteCloser) rpc.ServerCodec
Click to show internal directories.
Click to hide internal directories.