diff --git a/context/context.go b/context/context.go index a486410..d583ca2 100644 --- a/context/context.go +++ b/context/context.go @@ -200,6 +200,8 @@ type Context interface { // GetInputName return the inputName of the event GetInputName() string + + GetDaprClient() dapr.Client } type Out interface { @@ -417,6 +419,10 @@ func (ctx *FunctionContext) Send(outputName string, data []byte) ([]byte, error) return nil, nil } +func (ctx *FunctionContext) GetDaprClient() dapr.Client { + return ctx.daprClient +} + func (ctx *FunctionContext) HasInputs() bool { if len(ctx.GetInputs()) > 0 { return true