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

kubo/client/rpc: way to signal node stopping #9973

Open
magik6k opened this issue May 10, 2019 · 3 comments
Open

kubo/client/rpc: way to signal node stopping #9973

magik6k opened this issue May 10, 2019 · 3 comments

Comments

@magik6k
Copy link
Member

magik6k commented May 10, 2019

Something like api.Closing() <-chan struct{}, to have a way to tell when daemon is shutting down, etc.

@Stebalien
Copy link
Member

api.Context()?

@magik6k
Copy link
Member Author

magik6k commented May 10, 2019

That works (and as a bonus we can implement the Context interface to return detailed cause through ctx.Err())

@Stebalien
Copy link
Member

We need to be very careful about implementing the context interface to avoid blowing up the number of goroutines. If we do that, we should immediately wrap it in a cancelable context.

See https://golang.org/src/context/context.go#L257.

@lidel lidel changed the title Way to signal node stopping kubo/client/rpc: way to signal node stopping Jun 19, 2023
@lidel lidel transferred this issue from ipfs/interface-go-ipfs-core Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants