Versions in this module Expand all Collapse all v1 v1.0.2 Aug 11, 2021 v1.0.1 Jun 22, 2021 Changes in this version + const DefaultMeshAddress + const DefaultMeshRequestTimeout + const DefaultMeshSerialization + const Version + var PermissionCheck = NoPermissionCheck + func AddDefaultExt(d motan.ExtensionFactory) + func Cmdline(w http.ResponseWriter, r *http.Request) + func GetDefaultExtFactory() motan.ExtensionFactory + func GetDefaultManageHandlers() map[string]http.Handler + func Handler(name string) http.Handler + func Index(w http.ResponseWriter, r *http.Request) + func MeshTrace(w http.ResponseWriter, r *http.Request) + func NoPermissionCheck(r *http.Request) bool + func Profile(w http.ResponseWriter, r *http.Request) + func StatConnections(w http.ResponseWriter) + func StatOpenFiles(w http.ResponseWriter) + func StatProcess(w http.ResponseWriter) + func StatSystem(w http.ResponseWriter) + func Symbol(w http.ResponseWriter, r *http.Request) + func Trace(w http.ResponseWriter, r *http.Request) + type Agent struct + ConfigFile string + Context *motan.Context + func NewAgent(extfactory motan.ExtensionFactory) *Agent + func (a *Agent) ExportService(url *motan.URL) error + func (a *Agent) GetAgentServer() motan.Server + func (a *Agent) OnAfterStart(f func(a *Agent)) + func (a *Agent) RegisterManageHandler(path string, handler http.Handler) + func (a *Agent) RuntimeDir() string + func (a *Agent) SetAllServicesAvailable() + func (a *Agent) SetAllServicesUnavailable() + func (a *Agent) SetSanpshotConf() + func (a *Agent) StartMotanAgent() + func (a *Agent) StartMotanAgentFromConfig(config *cfg.Config) + func (a *Agent) SubscribeService(url *motan.URL) error + func (a *Agent) UnexportService(url *motan.URL) error + type AgentListener struct + CurrentCommandInfo string + func (a *AgentListener) GetIdentity() string + func (a *AgentListener) NotifyCommand(registryURL *motan.URL, commandType int, commandInfo string) + type Client struct + func NewClient(url *motan.URL, cluster *cluster.MotanCluster, ...) *Client + func (c *Client) BaseCall(req motan.Request, reply interface{}) error + func (c *Client) BaseGo(req motan.Request, reply interface{}, done chan *motan.AsyncResult) *motan.AsyncResult + func (c *Client) BuildRequest(method string, args []interface{}) motan.Request + func (c *Client) Call(method string, args []interface{}, reply interface{}) error + func (c *Client) Go(method string, args []interface{}, reply interface{}, ...) *motan.AsyncResult + type CustomTrace struct + func (c *CustomTrace) Trace(rid uint64, ext *motan.StringMap) *motan.TraceContext + type DebugHandler struct + func (d *DebugHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) + type DynamicConfigurer struct + func NewDynamicConfigurer(agent *Agent) *DynamicConfigurer + func (c *DynamicConfigurer) Register(url *core.URL) error + func (c *DynamicConfigurer) Subscribe(url *core.URL) error + func (c *DynamicConfigurer) Unregister(url *core.URL) error + type DynamicConfigurerHandler struct + func (h *DynamicConfigurerHandler) ServeHTTP(res http.ResponseWriter, req *http.Request) + func (h *DynamicConfigurerHandler) SetAgent(agent *Agent) + type HotReload struct + func (h *HotReload) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (h *HotReload) SetAgent(agent *Agent) + type InfoHandler struct + func (i *InfoHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) + func (i *InfoHandler) SetAgent(agent *Agent) + type LogHandler struct + func (l *LogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type MCContext struct + func GetClientContext(confFile string) *MCContext + func GetClientContextWithFlagParse(confFile string, parseFlag bool) *MCContext + func NewClientContextFromConfig(conf *config.Config) (mc *MCContext) + func (m *MCContext) GetClient(clientid string) *Client + func (m *MCContext) GetRefer(service string) interface{} + func (m *MCContext) Initialize() + func (m *MCContext) Start(extfactory motan.ExtensionFactory) + type MSContext struct + func GetMotanServerContext(confFile string) *MSContext + func GetMotanServerContextWithFlagParse(confFile string, parseFlag bool) *MSContext + func NewMotanServerContextFromConfig(conf *config.Config) (ms *MSContext) + func (m *MSContext) Initialize() + func (m *MSContext) RegisterService(s interface{}, sid string) error + func (m *MSContext) ServicesAvailable() + func (m *MSContext) ServicesUnavailable() + func (m *MSContext) Start(extfactory motan.ExtensionFactory) + type MeshClient struct + func NewMeshClient() *MeshClient + func (c *MeshClient) BaseCall(request core.Request, reply interface{}) core.Response + func (c *MeshClient) BuildRequest(service string, method string, args []interface{}) core.Request + func (c *MeshClient) BuildRequestWithGroup(service string, method string, args []interface{}, group string) core.Request + func (c *MeshClient) Call(service string, method string, args []interface{}, reply interface{}) error + func (c *MeshClient) Destroy() + func (c *MeshClient) Initialize() + func (c *MeshClient) SetAddress(address string) + func (c *MeshClient) SetApplication(application string) + func (c *MeshClient) SetRequestTimeout(requestTimeout time.Duration) + func (c *MeshClient) SetSerialization(serialization string) + type PermissionCheckFunc func(r *http.Request) bool + type SetAgent interface + SetAgent func(agent *Agent) + type StatConn struct + Established uint32 + Listen uint32 + TimeWait uint32 + type StatConnInfo struct + Fd uint32 + LocalAddr string + RemoteAddr string + Status string + type StatIOInfo struct + ReadRate uint64 + ReadTotal uint64 + WriteRate uint64 + WriteTotal uint64 + type StatMemInfo struct + MemPercent float64 + MemTotal uint64 + MemUsed uint64 + SwapPercent float64 + SwapTotal uint64 + SwapUsed uint64 + type StatNetInfo struct + IP []string + Name string + RecvRate uint64 + SentRate uint64 + type StatProcessEntity struct + Connections *StatConn + CpuPercent float64 + CreateTime string + IO *StatIOInfo + MemoryPercent float32 + NumFDs int32 + NumThreads int32 + OpenFilesCount int32 + UsedMemory float64 + type StatSystemEntity struct + BootTime string + CpuCores int32 + CpuPercent float64 + GoVersion string + HostName string + KernelVersion string + Load1 float64 + Load15 float64 + Load5 float64 + MemInfo *StatMemInfo + NetInfo []StatNetInfo + Platform string + PlatformVersion string + type StatusHandler struct + func (s *StatusHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) + func (s *StatusHandler) SetAgent(agent *Agent) + type SwitcherHandler struct + func (s *SwitcherHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)