Documentation
¶
Overview ¶
*
- =========================================================================== *
- define all interface in this file
- =========================================================================== *
Index ¶
- Constants
- type Agent
- func (myself *Agent) FireByPublish(eventName string, msgBody []byte, callback ...api.Callback) error
- func (myself *Agent) FireByQueue(eventName string, msgBody []byte, callback ...api.Callback) error
- func (myself *Agent) GetClient() *ClientEndpoint
- func (myself *Agent) On(eventName string, fn func(api.ReqMsgContext)) error
- func (myself *Agent) Start()
- func (myself *Agent) Stop()
- type ClientEndpoint
- func (myself *ClientEndpoint) FireByPublish(eventName string, msgBody []byte, callback ...api.Callback) error
- func (myself *ClientEndpoint) FireByQueue(eventName string, msgBody []byte, callback ...api.Callback) error
- func (myself *ClientEndpoint) On(eventName string, fn func(api.ReqMsgContext)) error
- type Config
- func (myself *Config) CheckBeforeStart() error
- func (myself *Config) SetNatsClientId(newClientId string)
- func (myself *Config) SetNatsClusterId(newClusterId string)
- func (myself *Config) SetNatsHost(hosts []string)
- func (myself *Config) SetNodeIdFilePath(nodeIdFilePath string)
- func (myself *Config) SetNodeRoles(newRoles []string)
- func (myself *Config) SetRegisterServer(config clientv3.Config)
- func (myself *Config) SetSettingDir(paths ...string)
Constants ¶
View Source
const ( PREFIX = "eventcar" STATUS_DONE int8 = 5 STATUS_RUNNING int8 = 1 STATUS_CANNEL int8 = 3 REQ_TIMEOUT = 3 * time.Second // ---- value is for interface "FutureReturnResult" NONE int8 = 0 ALL_COMPLETE int8 = 1 ANY_ERRORS int8 = 2 ALL_ERRORS int8 = 3 )
*
- --------------------------------- *
- constant region
- --------------------------------- *
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent define service bus agent proxy
func (*Agent) FireByPublish ¶
func (*Agent) FireByQueue ¶
FireByQueue call by event name and define callback
func (*Agent) GetClient ¶ added in v0.0.3
func (myself *Agent) GetClient() *ClientEndpoint
get client apit define
type ClientEndpoint ¶ added in v0.0.3
type ClientEndpoint struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.0.3
func NewClient(nodeNum int64, natsConn stan.Conn, cli *clientv3.Client) *ClientEndpoint
NewAgent check agent
func (*ClientEndpoint) FireByPublish ¶ added in v0.0.3
func (*ClientEndpoint) FireByQueue ¶ added in v0.0.3
func (myself *ClientEndpoint) FireByQueue(eventName string, msgBody []byte, callback ...api.Callback) error
FireByQueue call by event name and define callback
func (*ClientEndpoint) On ¶ added in v0.0.3
func (myself *ClientEndpoint) On(eventName string, fn func(api.ReqMsgContext)) error
On implement event name
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config
func (*Config) CheckBeforeStart ¶
func (*Config) SetNatsClientId ¶
func (*Config) SetNatsClusterId ¶
func (*Config) SetNatsHost ¶
func (*Config) SetNodeIdFilePath ¶
func (*Config) SetNodeRoles ¶
func (*Config) SetRegisterServer ¶
SetRegisterServer define restier servers handle
func (*Config) SetSettingDir ¶
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
* * =========================================================================== * * define all interface in this file * =========================================================================== *
|
* * =========================================================================== * * define all interface in this file * =========================================================================== * |
test
|
|