Skip to content

Commit

Permalink
Add WithThreadInitializer for custom initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
rohansingh committed May 20, 2024
1 parent 5db707e commit c7da61b
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 c7da61b

Please sign in to comment.