Documentation
¶
Index ¶
- Variables
- func AddExternalApp(app string, callConf string) bool
- func AddExternalAppManually(app string, callConf string) bool
- func EasyStart() (string, int)
- func Init()
- func IsClient() bool
- func IsServer() bool
- func SetLoadBalancer(lb LoadBalancer)
- func SetLogger(logger *log.Logger)
- func SetNode(app, addr string, weight int)
- func SetRoute(route func(appClient *AppClient, request *http.Request))
- func Start(addr string) bool
- func Stop()
- func Wait()
- type AppClient
- type Caller
- func (caller *Caller) Delete(app, path string, data interface{}, headers ...string) *httpclient.Result
- func (caller *Caller) Do(method, app, path string, data interface{}, headers ...string) *httpclient.Result
- func (caller *Caller) DoWithNode(method, app, withNode, path string, data interface{}, headers ...string) (*httpclient.Result, string)
- func (caller *Caller) Get(app, path string, headers ...string) *httpclient.Result
- func (caller *Caller) Head(app, path string, headers ...string) *httpclient.Result
- func (caller *Caller) ManualDo(method, app, path string, data interface{}, headers ...string) *httpclient.Result
- func (caller *Caller) ManualDoWithNode(method, app, withNode, path string, data interface{}, headers ...string) (*httpclient.Result, string)
- func (caller *Caller) Open(app, path string, headers ...string) *websocket.Conn
- func (caller *Caller) Post(app, path string, data interface{}, headers ...string) *httpclient.Result
- func (caller *Caller) Put(app, path string, data interface{}, headers ...string) *httpclient.Result
- type DefaultLoadBalancer
- type LoadBalancer
- type NodeInfo
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddExternalApp ¶
func AddExternalAppManually ¶ added in v1.7.5
Types ¶
type AppClient ¶
type AppClient struct { Logger *log.Logger App string Method string Path string Data *map[string]interface{} Headers *map[string]string // contains filtered or unexported fields }
type Caller ¶
func (*Caller) Delete ¶
func (caller *Caller) Delete(app, path string, data interface{}, headers ...string) *httpclient.Result
func (*Caller) Do ¶
func (caller *Caller) Do(method, app, path string, data interface{}, headers ...string) *httpclient.Result
func (*Caller) DoWithNode ¶
func (*Caller) Get ¶
func (caller *Caller) Get(app, path string, headers ...string) *httpclient.Result
func (*Caller) Head ¶
func (caller *Caller) Head(app, path string, headers ...string) *httpclient.Result
func (*Caller) ManualDo ¶ added in v1.7.5
func (caller *Caller) ManualDo(method, app, path string, data interface{}, headers ...string) *httpclient.Result
func (*Caller) ManualDoWithNode ¶ added in v1.7.5
type LoadBalancer ¶
Click to show internal directories.
Click to hide internal directories.