| 129 | } |
| 130 | |
| 131 | func (s *statelessCheckState) CheckBody(ctx context.Context, header textproto.Header, body buffer.Buffer) module.CheckResult { |
| 132 | if s.c.bodyCheck == nil { |
| 133 | return module.CheckResult{} |
| 134 | } |
| 135 | defer trace.StartRegion(ctx, s.c.modName+"/CheckBody").End() |
| 136 | |
| 137 | originalRes := s.c.bodyCheck(StatelessCheckContext{ |
| 138 | Context: ctx, |
| 139 | Resolver: s.c.resolver, |
| 140 | MsgMeta: s.msgMeta, |
| 141 | Logger: target.DeliveryLogger(s.c.logger, s.msgMeta), |
| 142 | }, header, body) |
| 143 | return s.c.failAction.Apply(originalRes) |
| 144 | } |
| 145 | |
| 146 | func (s *statelessCheckState) Close() error { |
| 147 | return nil |