MCPcopy Create free account
hub / github.com/docker/secrets-engine / Run

Method Run

plugin/stub.go:89–106  ·  view source on GitHub ↗

Run the plugin. Start event processing then wait for an error or getting stopped.

(ctx context.Context)

Source from the content-addressed store, hash-verified

87
88// Run the plugin. Start event processing then wait for an error or getting stopped.
89func (stub *stub) Run(ctx context.Context) error {
90 if !stub.m.TryLock() {
91 return fmt.Errorf("already running")
92 }
93 defer stub.m.Unlock()
94 errCh := make(chan error, 1)
95 ipc, err := stub.factory(ctx, func(err error) {
96 errCh <- err
97 })
98 if err != nil {
99 return err
100 }
101 select {
102 case <-ctx.Done():
103 case err = <-errCh:
104 }
105 return errors.Join(ipc.Close(), err)
106}
107
108func (stub *stub) RegistrationTimeout() time.Duration {
109 return stub.registrationTimeout

Callers

nothing calls this directly

Calls 3

ErrorfMethod · 0.65
UnlockMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected