You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement Subscribe API call for BYOC
also fix collection stream error handling
* Add subscribe test and output whole message in one call in tail
* Remove Errs() method from collection stream
Keep all channel logic inside collection stream code
* Abstract ECS event parsing
* Fix event filtering, use defer to make sure term clean up
* Restructure tail log message construction
* Simplify append
Co-authored-by: Lio李歐 <[email protected]>
* Revert "Simplify append"
This reverts commit ba38ee9.
---------
Co-authored-by: Edward J <[email protected]>
Co-authored-by: Lio李歐 <[email protected]>
// TODO: etag is not available at service and deployment level, find a possible correlation, possibly task definition revision using the deploymentId
217
-
snStart:=strings.LastIndex(ecsSvcName, "_") // ecsSvcName is in the format "project_service-random", our validation does not allow '_' in service names
218
-
snEnd:=strings.LastIndex(ecsSvcName, "-")
219
-
ifsnStart<0||snEnd<0||snStart>=snEnd {
220
-
returnfmt.Errorf("error parsing ECS service action: invalid service name %q", ecsEvt.Resources[0])
221
-
}
222
-
entry.Service=ecsSvcName[snStart+1 : snEnd]
223
-
entry.Host=detail.DeploymentId
224
-
fmt.Fprintf(&buf, "%s", detail.EventName)
225
-
ifdetail.Reason!="" {
226
-
fmt.Fprintf(&buf, " : %s", detail.Reason)
227
-
}
228
-
default:
229
-
entry.Service="ecs"
230
-
iflen(ecsEvt.Resources) >0 {
231
-
entry.Host=path.Base(ecsEvt.Resources[0])
232
-
}
233
-
// Print the unrecogonalized ECS event detail in prettry JSON format if possible
0 commit comments