From 2ac3b240b118961c1a30cc18dd22d08b7fac6516 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Wed, 30 Jun 2021 11:08:40 +0300 Subject: - Update arch diagrams - Update ephemeral plugin Signed-off-by: Valery Piashchynski --- plugins/informer/rpc.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/informer/rpc.go') diff --git a/plugins/informer/rpc.go b/plugins/informer/rpc.go index 3925ef64..f096a0af 100644 --- a/plugins/informer/rpc.go +++ b/plugins/informer/rpc.go @@ -38,3 +38,17 @@ func (rpc *rpc) Workers(service string, list *WorkerList) error { return nil } + +// sort.Sort + +func (w *WorkerList) Len() int { + return len(w.Workers) +} + +func (w *WorkerList) Less(i, j int) bool { + return w.Workers[i].Pid < w.Workers[j].Pid +} + +func (w *WorkerList) Swap(i, j int) { + w.Workers[i], w.Workers[j] = w.Workers[j], w.Workers[i] +} -- cgit v1.2.3