MCPcopy Create free account
hub / github.com/foxcpp/maddy / RunEarlyChecks

Method RunEarlyChecks

internal/msgpipeline/msgpipeline.go:97–113  ·  view source on GitHub ↗
(ctx context.Context, state *module.ConnState)

Source from the content-addressed store, hash-verified

95}
96
97func (d *MsgPipeline) RunEarlyChecks(ctx context.Context, state *module.ConnState) error {
98 eg, checkCtx := errgroup.WithContext(ctx)
99
100 // TODO: See if there is some point in parallelization of this
101 // function.
102 for _, check := range d.globalChecks {
103 earlyCheck, ok := check.(module.EarlyCheck)
104 if !ok {
105 continue
106 }
107
108 eg.Go(func() error {
109 return earlyCheck.CheckConnection(checkCtx, state)
110 })
111 }
112 return eg.Wait()
113}
114
115// StartDelivery starts new message delivery, runs connection and sender checks, sender modifiers
116// and selects source block from config to use for handling.

Callers 2

NewSessionMethod · 0.80
AuthPlainMethod · 0.80

Calls 1

CheckConnectionMethod · 0.65

Tested by

no test coverage detected