Skip to content
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

🤔[question] I want to callback the interface when the resource is released. #9734

Closed
2 tasks done
caiduoduo12138 opened this issue Jul 26, 2024 · 2 comments
Closed
2 tasks done
Labels

Comments

@caiduoduo12138
Copy link

caiduoduo12138 commented Jul 26, 2024

Describe your question

I want add the callback when the resource is released. I try to add some code at resources.go:
image
And I build this project from source code using MakeFile, but it seems does not work. Even l add some fmt.Println code and it also does not work.
Inform function
image
can you give me some advice, thanks.

Checklist

  • Did you search the docs for a solution?
  • Did you search github issues to find if somebody asked this question before?
@ioga
Copy link
Contributor

ioga commented Jul 29, 2024

And I build this project from source code using MakeFile, but it seems does not work. Even l add some fmt.Println code and it also does not work.

I'd suggest you figure out if you can make custom builds of the software with your code changes. For example, you can put some prints into Run function in core.go which is called on master startup to initialize everything, so it'll be easy for you to confirm your changes are there.

Then, once you know you can change the code with confidence, you can hack it further.

Also, String() method on ResourcesStopped is called to create a string representation of that object — it won't necessarily happen when the resources are released.

@caiduoduo12138
Copy link
Author

And I build this project from source code using MakeFile, but it seems does not work. Even l add some fmt.Println code and it also does not work.

I'd suggest you figure out if you can make custom builds of the software with your code changes. For example, you can put some prints into Run function in core.go which is called on master startup to initialize everything, so it'll be easy for you to confirm your changes are there.

Then, once you know you can change the code with confidence, you can hack it further.

Also, String() method on ResourcesStopped is called to create a string representation of that object — it won't necessarily happen when the resources are released.

thanks for you reply, I will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants