()
| 141 | } |
| 142 | |
| 143 | func (hs *hooksMixin) chain() { |
| 144 | hs.initial.setDefaults() |
| 145 | |
| 146 | hs.hooksMu.Lock() |
| 147 | defer hs.hooksMu.Unlock() |
| 148 | |
| 149 | hs.current.dial = hs.initial.dial |
| 150 | hs.current.process = hs.initial.process |
| 151 | hs.current.pipeline = hs.initial.pipeline |
| 152 | hs.current.txPipeline = hs.initial.txPipeline |
| 153 | |
| 154 | for i := len(hs.slice) - 1; i >= 0; i-- { |
| 155 | if wrapped := hs.slice[i].DialHook(hs.current.dial); wrapped != nil { |
| 156 | hs.current.dial = wrapped |
| 157 | } |
| 158 | if wrapped := hs.slice[i].ProcessHook(hs.current.process); wrapped != nil { |
| 159 | hs.current.process = wrapped |
| 160 | } |
| 161 | if wrapped := hs.slice[i].ProcessPipelineHook(hs.current.pipeline); wrapped != nil { |
| 162 | hs.current.pipeline = wrapped |
| 163 | } |
| 164 | if wrapped := hs.slice[i].ProcessPipelineHook(hs.current.txPipeline); wrapped != nil { |
| 165 | hs.current.txPipeline = wrapped |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | func (hs *hooksMixin) clone() hooksMixin { |
| 171 | hs.hooksMu.Lock() |
no test coverage detected