Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Services map[string]service `json:"services"`
}
Config ...
func ParseConfig ¶
ParseConfig read config from json.
type Header ¶
A Header represents the key-value pairs in a message header.
type Logger ¶
type Logger interface {
Infof(format string, args ...interface{})
Errorf(format string, args ...interface{})
Debugf(format string, args ...interface{})
}
Logger is an interface for logger to pass into mt server.
type MT ¶
type MT interface {
ConnectAndServe() error
HandleFunc(serviceName string, handler func(*Request) error)
Call(serviceName string, request Request, res func(response Response)) error
Cast(serviceName string, request Request) error
Shutdown() error
HealthCheck() bool
}
MT is a interface.
Click to show internal directories.
Click to hide internal directories.