Documentation ¶
Index ¶
- func ActionContext(broker *nucleo.BrokerDelegates, values map[string]interface{}) nucleo.BrokerContext
- func BrokerContext(broker *nucleo.BrokerDelegates) nucleo.BrokerContext
- func EventContext(broker *nucleo.BrokerDelegates, values map[string]interface{}) nucleo.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() *nucleo.BrokerDelegates
- func (context *Context) Call(actionName string, params interface{}, opts ...nucleo.Options) chan nucleo.Payload
- func (context *Context) Caller() string
- func (context *Context) ChildActionContext(actionName string, params nucleo.Payload, opts ...nucleo.Options) nucleo.BrokerContext
- func (context *Context) ChildEventContext(eventName string, params nucleo.Payload, groups []string, broadcast bool) nucleo.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]nucleo.Payload
- func (context *Context) Meta() nucleo.Payload
- func (context *Context) Payload() nucleo.Payload
- func (context *Context) PayloadSchema() map[string]interface{}
- func (context *Context) Publish(services ...interface{})
- func (context *Context) RequestID() string
- func (context *Context) SetPayloadSchema(schema map[string]interface{})
- func (context *Context) SetTargetNodeID(targetNodeID string)
- func (context *Context) SourceNodeID() string
- func (context *Context) TargetNodeID() string
- func (context *Context) UpdateMeta(meta nucleo.Payload)
- func (context *Context) WaitFor(services ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActionContext ¶
func ActionContext(broker *nucleo.BrokerDelegates, values map[string]interface{}) nucleo.BrokerContext
ActionContext create an action context for remote call.
func BrokerContext ¶
func BrokerContext(broker *nucleo.BrokerDelegates) nucleo.BrokerContext
func EventContext ¶
func EventContext(broker *nucleo.BrokerDelegates, values map[string]interface{}) nucleo.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() *nucleo.BrokerDelegates
Config return the broker config attached to this context.
func (*Context) Call ¶
func (context *Context) Call(actionName string, params interface{}, opts ...nucleo.Options) chan nucleo.Payload
Call : main entry point to call actions. chained action invocation
func (*Context) ChildActionContext ¶
func (context *Context) ChildActionContext(actionName string, params nucleo.Payload, opts ...nucleo.Options) nucleo.BrokerContext
ChildActionContext : create a child context for a specific action call.
func (*Context) ChildEventContext ¶
func (context *Context) ChildEventContext(eventName string, params nucleo.Payload, groups []string, broadcast bool) nucleo.BrokerContext
ChildEventContext : create a child context for a specific event call.
func (*Context) IsBroadcast ¶
func (*Context) PayloadSchema ¶ added in v0.1.4
func (*Context) SetPayloadSchema ¶ added in v0.1.4
func (*Context) SetTargetNodeID ¶
func (*Context) SourceNodeID ¶
func (*Context) TargetNodeID ¶
func (*Context) UpdateMeta ¶
func (context *Context) UpdateMeta(meta nucleo.Payload)
Click to show internal directories.
Click to hide internal directories.