Documentation
¶
Index ¶
- func ActionContext(broker *moleculer.BrokerDelegates, values map[string]interface{}) moleculer.BrokerContext
- func BrokerContext(broker *moleculer.BrokerDelegates) moleculer.BrokerContext
- func EventContext(broker *moleculer.BrokerDelegates, values map[string]interface{}) moleculer.BrokerContext
- type Context
- func (context *Context) ActionName() string
- func (context *Context) AsMap() map[string]interface{}
- func (context *Context) Broadcast(eventName string, params interface{}, groups ...string)
- func (context *Context) BrokerDelegates() *moleculer.BrokerDelegates
- func (context *Context) Call(actionName string, params interface{}, opts ...moleculer.Options) chan moleculer.Payload
- func (context *Context) Caller() string
- func (context *Context) ChildActionContext(actionName string, params moleculer.Payload, opts ...moleculer.Options) moleculer.BrokerContext
- func (context *Context) ChildEventContext(eventName string, params moleculer.Payload, groups []string, broadcast bool) moleculer.BrokerContext
- func (context *Context) Emit(eventName string, params interface{}, groups ...string)
- func (context *Context) EventName() string
- func (context *Context) Groups() []string
- func (context *Context) ID() string
- func (context *Context) IsBroadcast() bool
- func (context *Context) Logger() *log.Entry
- func (context *Context) MCall(callMaps map[string]map[string]interface{}) chan map[string]moleculer.Payload
- func (context *Context) Meta() moleculer.Payload
- func (context *Context) Payload() moleculer.Payload
- func (context *Context) Publish(services ...interface{})
- func (context *Context) RequestID() string
- func (context *Context) SetTargetNodeID(targetNodeID string)
- func (context *Context) SourceNodeID() string
- func (context *Context) TargetNodeID() string
- func (context *Context) UpdateMeta(meta moleculer.Payload)
- func (context *Context) WaitFor(services ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionContext ¶
func ActionContext(broker *moleculer.BrokerDelegates, values map[string]interface{}) moleculer.BrokerContext
ActionContext create an action context for remote call.
func BrokerContext ¶
func BrokerContext(broker *moleculer.BrokerDelegates) moleculer.BrokerContext
func EventContext ¶
func EventContext(broker *moleculer.BrokerDelegates, values map[string]interface{}) moleculer.BrokerContext
EventContext create an event context for a remote call.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) ActionName ¶
func (*Context) BrokerDelegates ¶
func (context *Context) BrokerDelegates() *moleculer.BrokerDelegates
Config return the broker config attached to this context.
func (*Context) Call ¶
func (context *Context) Call(actionName string, params interface{}, opts ...moleculer.Options) chan moleculer.Payload
Call : main entry point to call actions. chained action invocation
func (*Context) ChildActionContext ¶
func (context *Context) ChildActionContext(actionName string, params moleculer.Payload, opts ...moleculer.Options) moleculer.BrokerContext
ChildActionContext : create a child context for a specific action call.
func (*Context) ChildEventContext ¶
func (context *Context) ChildEventContext(eventName string, params moleculer.Payload, groups []string, broadcast bool) moleculer.BrokerContext
ChildEventContext : create a child context for a specific event call.
func (*Context) IsBroadcast ¶
func (*Context) SetTargetNodeID ¶
func (*Context) SourceNodeID ¶
func (*Context) TargetNodeID ¶
func (*Context) UpdateMeta ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.