(ctx context.Context, f reflect.Value)
| 102 | } |
| 103 | |
| 104 | func funcToProducer(ctx context.Context, f reflect.Value) Producer { |
| 105 | _, err := checkSignature(ctx, f.Type(), |
| 106 | []reflect.Type{contextType}, |
| 107 | []reflect.Type{nil}, |
| 108 | ) |
| 109 | if err != nil { |
| 110 | log.F(ctx, true, "Checking producer signature. Error: %v", err) |
| 111 | } |
| 112 | return func(ctx context.Context) interface{} { |
| 113 | args := []reflect.Value{reflect.ValueOf(ctx)} |
| 114 | return safeObject(f.Call(args)[0]) |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | func funcToPredicate(ctx context.Context, f reflect.Value) Predicate { |
| 119 | t, err := checkSignature(ctx, f.Type(), |
no test coverage detected