Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OptionDialAsync ¶
type OptionDialAsync = rome.OptionDialAsync
type OptionMaxReconnectTime ¶
type OptionMaxReconnectTime = rome.OptionMaxReconnectTime
type OptionOther ¶
type OptionOther = rome.OptionOther
type OptionReconnectTime ¶
type OptionReconnectTime = rome.OptionReconnectTime
type OptionTLSConfig ¶
type OptionTLSConfig = rome.OptionTLSConfig
type Server ¶
type Server interface {
// Dial is used to dial a remote server. This may be called multiple
// times to dial to different servers. If multiple connections are
// present, then the client will automatically select the best
// one based on readiness to service the request.
Dial(url string, opts ...interface{}) error
// Listen is much like dial, but acts as a server. This allows
// the normal server/client roles to be reversed while still
// maintaining the REQ/REP higher level roles. It is possible
// to freely mix and match multiple calls of Listen, with or without
// calls to Dial.
Listen(url string, opts ...interface{}) error
// SetOption sets global options on the server, such as retry times.
SetOption(opts ...interface{}) error
// Close closes down the socket. In-flight requests will be aborted
// and return accordingly.
Close()
// Register registers an object instance. Each method that meets the
// necessary criteria is registered using the name "<type>.method"
// The type must be an exported type.
Register(obj interface{}) error
// RegisterName is like Register, but allows a different name to
// be supplied for the object itself. If the name is the empty
// string then methods will be exposed using the method name without
// any prefix.
RegisterName(name string, obj interface{}) error
// RegisterFunc registers a function using the supplied name.
// The name has to be supplied because reflection cannot see
// function names. The function must have signature
// func(args *ArgType, result *resultType) error.
RegisterFunc(name string, fn interface{}) error
// Serve serves one context synchronously. This is the simplest
// and least form of service, as it runs utterly synchronously.
Serve()
// ServeAsync serves asynchronously, firing off the given number
// of go routines, each with their own context, in parallel.
// It returns immediately.
ServeAsync(workers int)
}
Click to show internal directories.
Click to hide internal directories.