mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
Unify Godoc formatting, fix various typos
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
This commit is contained in:
@@ -28,17 +28,17 @@ import (
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// PodConfigNotificationMode describes how changes are sent to the update channel
|
||||
// PodConfigNotificationMode describes how changes are sent to the update channel.
|
||||
type PodConfigNotificationMode int
|
||||
|
||||
const (
|
||||
// PodConfigNotificationSnapshot delivers the full configuration as a SET whenever
|
||||
// any change occurs
|
||||
// any change occurs.
|
||||
PodConfigNotificationSnapshot = iota
|
||||
// PodConfigNotificationSetsAndUpdates delivers an UPDATE message whenever pods are
|
||||
// PodConfigNotificationSnapshotAndUpdates delivers an UPDATE message whenever pods are
|
||||
// changed, and a SET message if there are any additions or removals.
|
||||
PodConfigNotificationSnapshotAndUpdates
|
||||
// PodConfigNotificationIncremental delivers ADD, UPDATE, and REMOVE to the update channel
|
||||
// PodConfigNotificationIncremental delivers ADD, UPDATE, and REMOVE to the update channel.
|
||||
PodConfigNotificationIncremental
|
||||
)
|
||||
|
||||
@@ -267,7 +267,7 @@ func filterInvalidPods(pods []kubelet.Pod, source string) (filtered []*kubelet.P
|
||||
return
|
||||
}
|
||||
|
||||
// Sync sends a copy of the current state through the update channel
|
||||
// Sync sends a copy of the current state through the update channel.
|
||||
func (s *podStorage) Sync() {
|
||||
s.updateLock.Lock()
|
||||
defer s.updateLock.Unlock()
|
||||
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Reads the pod configuration from etcd using the Kubernetes etcd schema
|
||||
// Reads the pod configuration from etcd using the Kubernetes etcd schema.
|
||||
package config
|
||||
|
||||
import (
|
||||
@@ -46,7 +46,7 @@ type SourceEtcd struct {
|
||||
timeout time.Duration
|
||||
}
|
||||
|
||||
// NewSourceEtcd creates a config source that watches and pulls from a key in etcd
|
||||
// NewSourceEtcd creates a config source that watches and pulls from a key in etcd.
|
||||
func NewSourceEtcd(key string, client tools.EtcdClient, updates chan<- interface{}) *SourceEtcd {
|
||||
config := &SourceEtcd{
|
||||
key: key,
|
||||
@@ -60,7 +60,7 @@ func NewSourceEtcd(key string, client tools.EtcdClient, updates chan<- interface
|
||||
return config
|
||||
}
|
||||
|
||||
// run loops forever looking for changes to a key in etcd
|
||||
// run loops forever looking for changes to a key in etcd.
|
||||
func (s *SourceEtcd) run() {
|
||||
index := uint64(0)
|
||||
for {
|
||||
@@ -76,7 +76,7 @@ func (s *SourceEtcd) run() {
|
||||
}
|
||||
|
||||
// fetchNextState fetches the key (or waits for a change to a key) and then returns
|
||||
// the nextIndex to read. It will watch no longer than s.waitDuration and then return
|
||||
// the nextIndex to read. It will watch no longer than s.waitDuration and then return.
|
||||
func (s *SourceEtcd) fetchNextState(fromIndex uint64) (nextIndex uint64, err error) {
|
||||
var response *etcd.Response
|
||||
|
||||
@@ -142,5 +142,4 @@ func stopChannel(until time.Duration) chan bool {
|
||||
close(stop)
|
||||
}()
|
||||
return stop
|
||||
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Reads the pod configuration from file or a directory of files
|
||||
// Reads the pod configuration from file or a directory of files.
|
||||
package config
|
||||
|
||||
import (
|
||||
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Reads the pod configuration from an HTTP GET response
|
||||
// Reads the pod configuration from an HTTP GET response.
|
||||
package config
|
||||
|
||||
import (
|
||||
|
Reference in New Issue
Block a user