Skip to content

Commit

Permalink
Add WithThreadInitializer for custom initializers (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohansingh authored May 20, 2024
1 parent 5db707e commit 515acac
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/applet.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ func WithModuleLoader(loader ModuleLoader) AppletOption {
}
}

func WithThreadInitializer(init ThreadInitializer) AppletOption {
return func(a *Applet) error {
a.initializers = append(a.initializers, init)
return nil
}
}

func WithSecretDecryptionKey(key *SecretDecryptionKey) AppletOption {
return func(a *Applet) error {
if decrypter, err := key.decrypterForApp(a); err != nil {
Expand Down

0 comments on commit 515acac

Please sign in to comment.