dapr / components-contrib

Community driven, reusable components for distributed apps
Apache License 2.0
545 stars 473 forks source link

sentinel-go middleware need cgo #1105

Closed ecafkoob closed 3 years ago

ecafkoob commented 3 years ago

Ask your question here

Sentinel-go relies on gopsutil for system information. For example, CPU load, etc. The dapr compiler disables cgo by default . This causes sentinel-go to not work properly. Will all plugins that rely on cgo be affected? I think it is possible to turn on the cgo option at compile time?

daixiang0 commented 3 years ago

Do you meet that dapr run into crash since sentinel-go?

ecafkoob commented 3 years ago

I'm just curious if there is other middleware that uses cgo. I haven't had any crashes due to sentinel-go. I just think that the absence of cgo might affect the proper functioning of sentinel-go. It's just the warnings that are printed out that might be confusing to me. Not a big problem

image
CodeMonkeyLeet commented 3 years ago

My understanding is that Dapr tries hard to avoid any dependency on cgo for portability reasons. The only previous instance of a cgo dependency I've come across was in a test.

@yaron2, thoughts on this?

dapr-bot commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.

dapr-bot commented 3 years ago

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.