Documentation ¶
Index ¶
Constants ¶
View Source
const ID = "rpc"
ID contains default service name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.1.0
type Config struct { // Indicates if RPC connection is enabled. Enable bool // Listen string Listen string }
Config defines RPC service config.
func (*Config) Hydrate ¶ added in v1.1.0
Hydrate must populate Config values using given Config source. Must return error if Config is not valid.
func (*Config) InitDefaults ¶ added in v1.2.2
InitDefaults allows to init blank config with pre-defined set of default values.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is RPC service.
func (*Service) Register ¶
Register publishes in the server the set of methods of the receiver value that satisfy the following conditions:
- exported method of exported type
- two arguments, both of exported type
- the second argument is a pointer
- one return value, of type error
It returns an error if the receiver is not an exported type or has no suitable methods. It also logs the error using package log.
Click to show internal directories.
Click to hide internal directories.