JIITODC / loadbalancer

Toy container-aware loadBalancer in Go
14 stars 12 forks source link

Reading env variable multiple times #21

Closed Shreyas220 closed 1 year ago

Shreyas220 commented 2 years ago

Context?

Every time a new container is detected our code reads the environment variable for label in GetServiceInfo() function in docker handler.

image

What's wrong with this?

We get the label not found error for every new container.

We should read the label only once and store it as variable.

So what changes can be done?

We can create a new variable in DockerHandler struct and use that in GetServiceInfo()

Shreyas220 commented 2 years ago

Hey @hitarth01 are you interested in doing this issue. ping me on discord if you have any doubts comment here once.

hitarth01 commented 2 years ago

Yes, I'm interested.

Shreyas220 commented 2 years ago

Hey @hitarth01 , how's the progress on this ? Do you need any help ?

hitarth01 commented 2 years ago

Hi @Shreyas220 , sorry for responding so late. I've been quite unwell lately. Will get back to it as soon as I'm well, though you can unassign me if needed.