Skip to content

Commit

Permalink
added rpc clients add func
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Jun 27, 2024
1 parent 9d2fb46 commit 9a32739
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpc/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a32739

Please sign in to comment.