-
Notifications
You must be signed in to change notification settings - Fork 25
pkg/utils: add LazyLoadCtx variant #1496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 jmank88, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
apidiff results - no incompatible changes detected ✅Module:
|
| l.ok = false | ||
| } | ||
|
|
||
| type LazyLoadCtx[T any] struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func comments please. i don't really understand the intention or use case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I forgot to link the ton PR that uses this. It is just a variant of LazyLoad that yields to context cancellation.
Solana has one here: https://github.com/smartcontractkit/chainlink-solana/blob/develop/pkg/solana/utils/loader.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also added more docs
Solana already has a variant like this, and ton needs one now.
Supports: