Documentation
¶
Index ¶
- Constants
- func Connect(opts broker.ConnectOptions) (interface{}, error)
- func GetConnectFunc(moduleType string) broker.ConnectFunc
- type Context
- func (s *Context) AddModule(info *common.ModuleInfo)
- func (s *Context) AddModuleGroup(module, group string)
- func (s *Context) Cleanup(module string)
- func (s *Context) Receive(module string) (model.Message, error)
- func (s *Context) Send(module string, message model.Message)
- func (s *Context) SendResp(message model.Message)
- func (s *Context) SendSync(module string, message model.Message, timeout time.Duration) (model.Message, error)
- func (s *Context) SendToGroup(group string, message model.Message)
- func (s *Context) SendToGroupSync(module string, message model.Message, timeout time.Duration) error
- type ModuleExchange
Constants ¶
View Source
const ( // TODO: configurable HandshakeTimeout = 60 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func Connect ¶ added in v1.10.3
func Connect(opts broker.ConnectOptions) (interface{}, error)
Connect socket connect
func GetConnectFunc ¶
func GetConnectFunc(moduleType string) broker.ConnectFunc
GetConnectFunc get connect func
Types ¶
type Context ¶ added in v1.10.3
Context is object for Context Socket
func InitSocketContext ¶
func InitSocketContext() *Context
func (*Context) AddModule ¶ added in v1.10.3
func (s *Context) AddModule(info *common.ModuleInfo)
func (*Context) AddModuleGroup ¶ added in v1.10.3
AddModuleGroup add module group
func (*Context) SendSync ¶ added in v1.10.3
func (s *Context) SendSync(module string, message model.Message, timeout time.Duration) (model.Message, error)
SendSync send sync
func (*Context) SendToGroup ¶ added in v1.10.3
SendToGroup send to group
type ModuleExchange ¶
type ModuleExchange struct {
Modules []string `json:"modules"`
Groups map[string][]string `json:"groups"`
}
ModuleExchange module exchange
Click to show internal directories.
Click to hide internal directories.