Documentation ¶
Index ¶
- func Call(ctx *gin.Context, client RpcClientInterface, method string, ...) (err error)
- func GetGinHandlerFunc() gin.HandlerFunc
- func GetService(app, service string) interface{}
- func Inject(instance interface{})
- func InjectConf(conf interface{})
- func IsRpcService(instance interface{}) bool
- func Load()
- type RpcClientContainer
- type RpcClientInterface
- type RpcConf
- type RpcConf_Client
- type RpcConf_Client_Service
- type RpcContainer
- type RpcController
- type RpcServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Call ¶
func Call(ctx *gin.Context, client RpcClientInterface, method string, req, rsp interface{}) (err error)
func GetGinHandlerFunc ¶
func GetGinHandlerFunc() gin.HandlerFunc
func GetService ¶
func GetService(app, service string) interface{}
func InjectConf ¶ added in v0.0.52
func InjectConf(conf interface{})
func IsRpcService ¶
func IsRpcService(instance interface{}) bool
Types ¶
type RpcClientContainer ¶
func (*RpcClientContainer) GetHost ¶ added in v0.0.5
func (i *RpcClientContainer) GetHost(app, service string) string
func (*RpcClientContainer) Save ¶
func (i *RpcClientContainer) Save(client *RpcConf_Client)
type RpcClientInterface ¶
type RpcConf ¶
type RpcConf struct { RequestURI string `json:"request_uri"` Clients []*RpcConf_Client `json:"clients"` }
func GetRpcConf ¶ added in v0.0.52
func GetRpcConf() *RpcConf
func (*RpcConf) ConfigName ¶
type RpcConf_Client ¶ added in v0.0.6
type RpcConf_Client struct { Host string `json:"host"` Services []*RpcConf_Client_Service `json:"services"` }
type RpcConf_Client_Service ¶ added in v0.0.6
type RpcContainer ¶
func (*RpcContainer) Get ¶
func (i *RpcContainer) Get(app, service string) interface{}
func (*RpcContainer) Save ¶
func (i *RpcContainer) Save(instance interface{})
type RpcController ¶
type RpcController struct { }
func (*RpcController) ControllerName ¶
func (c *RpcController) ControllerName() (app, name string)
type RpcServiceInterface ¶
Click to show internal directories.
Click to hide internal directories.