From 9a32739e0612d0add43e70f31f28a138ad2db83b Mon Sep 17 00:00:00 2001 From: Charles Billette Date: Thu, 27 Jun 2024 07:35:00 -0400 Subject: [PATCH] added rpc clients add func --- rpc/clients.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpc/clients.go b/rpc/clients.go index af03622..c427a09 100644 --- a/rpc/clients.go +++ b/rpc/clients.go @@ -20,6 +20,10 @@ func NewClients[C any](clients []C) *Clients[C] { } } +func (c *Clients[C]) Add(client C) { + c.clients = append(c.clients, client) +} + func (c *Clients[C]) Next() (client C, err error) { if len(c.clients) <= c.next { return client, ErrorNoMoreClient