mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-27 17:21:34 +00:00
Add pod delete control
- Push shortcut reports when pods are created/deleted - Buffer upto 2 reports instead of dropping them
This commit is contained in:
@@ -175,6 +175,15 @@ func ParsePodNodeID(podNodeID string) (namespaceID, podID string, ok bool) {
|
||||
return fields[0], fields[1], true
|
||||
}
|
||||
|
||||
// ParseServiceNodeID produces the namespace ID and service ID from an service node ID.
|
||||
func ParseServiceNodeID(serviceNodeID string) (namespaceID, serviceID string, ok bool) {
|
||||
fields := strings.SplitN(serviceNodeID, ScopeDelim, 2)
|
||||
if len(fields) != 2 {
|
||||
return "", "", false
|
||||
}
|
||||
return fields[0], fields[1], true
|
||||
}
|
||||
|
||||
// ExtractHostID extracts the host id from Node
|
||||
func ExtractHostID(m Node) string {
|
||||
hostNodeID, _ := m.Latest.Lookup(HostNodeID)
|
||||
|
||||
Reference in New Issue
Block a user