Documentation ¶
Index ¶
Constants ¶
View Source
const ( RemoteHTTP = "http" RemoteRPC = "rpc" )
View Source
const (
ParameterAddr = "addr"
)
Variables ¶
View Source
var (
ErrInvalidAddress = errors.New("parameter '" + ParameterAddr + "' is invalid")
)
View Source
var (
ErrInvalidRemote = errors.New("invalid remote")
)
Functions ¶
This section is empty.
Types ¶
type ErrInvalidStatus ¶
type ErrInvalidStatus struct {
// contains filtered or unexported fields
}
func (ErrInvalidStatus) Error ¶
func (e ErrInvalidStatus) Error() string
type HTTPConfig ¶
type HTTPConfig struct {
Addr string `json:"addr"`
}
func GetHTTPConfig ¶
func GetHTTPConfig(conf *config.Config) (HTTPConfig, error)
func (HTTPConfig) Validate ¶
func (c HTTPConfig) Validate() error
type HTTPConnection ¶
type HTTPConnection struct { HTTPConfig // contains filtered or unexported fields }
func NewHTTPConnection ¶
func NewHTTPConnection(config HTTPConfig) HTTPConnection
func (HTTPConnection) Close ¶
func (c HTTPConnection) Close() error
func (HTTPConnection) Connect ¶
func (c HTTPConnection) Connect() error
func (HTTPConnection) HandleEntry ¶
func (HTTPConnection) Start ¶
func (c HTTPConnection) Start() error
type RPCConnection ¶
type RPCConnection struct {
RPCConfig
}
func NewRPCConnection ¶
func NewRPCConnection(config RPCConfig) (*RPCConnection, error)
func (RPCConnection) Close ¶
func (c RPCConnection) Close() error
func (RPCConnection) Connect ¶
func (c RPCConnection) Connect() error
func (RPCConnection) HandleEntry ¶
func (*RPCConnection) Start ¶
func (c *RPCConnection) Start() error
type RPCServer ¶
type RPCServer struct { RPCConfig // contains filtered or unexported fields }
func (RPCServer) CloseServer ¶
func (RPCServer) HandleEntry ¶
func (RPCServer) StartServer ¶
type Remote ¶
type Remote interface { // start the remote service, this can block until the service is done Start() error // This method shuts the remote service down Close() error // connect to the remote service (make sure it is running) Connect() error // handle an entry: forward it to the remote service HandleEntry(entry entry.Entry, options map[string]string) error }
A Remote provide an EntryHandler
Click to show internal directories.
Click to hide internal directories.