From 28619550250bcabf4fc0c5ca49290352e785d004 Mon Sep 17 00:00:00 2001 From: Yuki Yugui Sonoda Date: Tue, 15 Jul 2014 22:03:08 +0900 Subject: [PATCH] Corrects wording of godoc comments. --- pkg/master/master.go | 2 +- pkg/proxy/config/config.go | 4 ++-- pkg/proxy/roundrobbin.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/master/master.go b/pkg/master/master.go index 7434ee135d4..e12fc7f28ec 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -109,7 +109,7 @@ func (m *Master) Run(myAddress, apiPrefix string) error { return s.ListenAndServe() } -// ConstructHandler returns an http.Handler which serves Kubernetes API. +// ConstructHandler returns an http.Handler which serves the Kubernetes API. // Instead of calling Run, you can call this function to get a handler for your own server. // It is intended for testing. Only call once. func (m *Master) ConstructHandler(apiPrefix string) http.Handler { diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index 9a95e037c3a..7f17d71d6f5 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -54,14 +54,14 @@ type EndpointsUpdate struct { Op Operation } -// ServiceConfigHandler is an abstract interface of objects which receive update notifications of the set of services. +// ServiceConfigHandler is an abstract interface of objects which receive update notifications for the set of services. type ServiceConfigHandler interface { // OnUpdate gets called when a configuration has been changed by one of the sources. // This is the union of all the configuration sources. OnUpdate(services []api.Service) } -// EndpointsConfigHandler is an abstract interface of objects which receive update notifications of the set of endpoints. +// EndpointsConfigHandler is an abstract interface of objects which receive update notifications for the set of endpoints. type EndpointsConfigHandler interface { // OnUpdate gets called when endpoints configuration is changed for a given // service on any of the configuration sources. An example is when a new diff --git a/pkg/proxy/roundrobbin.go b/pkg/proxy/roundrobbin.go index e6e192e399b..a5acebba7fc 100644 --- a/pkg/proxy/roundrobbin.go +++ b/pkg/proxy/roundrobbin.go @@ -41,7 +41,7 @@ func NewLoadBalancerRR() *LoadBalancerRR { return &LoadBalancerRR{endpointsMap: make(map[string][]string), rrIndex: make(map[string]int)} } -// LoadBalance select an endpoint of the service by round-robin algorithm. +// LoadBalance selects an endpoint of the service by round-robin algorithm. func (impl LoadBalancerRR) LoadBalance(service string, srcAddr net.Addr) (string, error) { impl.lock.RLock() endpoints, exists := impl.endpointsMap[service]