Commit b9ca74f1 authored by Geoff Simmons's avatar Geoff Simmons

gofmt changes (comments only)

parent 32431317
......@@ -38,7 +38,6 @@
//
// Currently there is one CustomResource named VarnishConfig.
//
//
// Most of the code in the API is generated by k8s code generators
// (see: k8s.io/code-generator).
package v1alpha1
......@@ -47,14 +47,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
......
......@@ -47,14 +47,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
// of clientsets, like in:
//
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
// import (
// "k8s.io/client-go/kubernetes"
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
// )
//
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
// kclientset, _ := kubernetes.NewForConfig(c)
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
//
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
// correctly.
......
......@@ -138,13 +138,13 @@ type IngressController struct {
// NewIngressController creates a controller.
//
// log: logger initialized at startup
// ingClass: value of the ingress.class Ingress annotation
// kubeClient: k8s client initialized at startup
// vc: Varnish controller
// infFactory: SharedInformerFactory to create informers & listers for
// the k8s standard client APIs
// vcrInfFactory: SharedInformerFactory for the project's own client APIs
// log: logger initialized at startup
// ingClass: value of the ingress.class Ingress annotation
// kubeClient: k8s client initialized at startup
// vc: Varnish controller
// infFactory: SharedInformerFactory to create informers & listers for
// the k8s standard client APIs
// vcrInfFactory: SharedInformerFactory for the project's own client APIs
func NewIngressController(
log *logrus.Logger,
ingClass string,
......
......@@ -325,12 +325,12 @@ type NamespaceQueues struct {
// NewNamespaceQueues creates a NamespaceQueues object.
//
// log: logger initialized at startup
// ingClass: value of the ingress.class Ingress annotation
// vController: Varnish controller initialied at startup
// listers: client-go/lister instance for each resource type
// client: k8s API client initialized at startup
// recorder: Event broadcaster initialized at startup
// log: logger initialized at startup
// ingClass: value of the ingress.class Ingress annotation
// vController: Varnish controller initialied at startup
// listers: client-go/lister instance for each resource type
// client: k8s API client initialized at startup
// recorder: Event broadcaster initialized at startup
func NewNamespaceQueues(
log *logrus.Logger,
ingClass string,
......
......@@ -155,9 +155,9 @@ func errStatus(err error) update.Status {
// Meta encapsulates meta-data for the resource types that enter into
// a Varnish configuration: Ingress, VarnishConfig and BackendConfig.
//
// Key: namespace/name
// UID: UID field from the resource meta-data
// Ver: ResourceVersion field from the resource meta-data
// Key: namespace/name
// UID: UID field from the resource meta-data
// Ver: ResourceVersion field from the resource meta-data
type Meta struct {
Key string
UID string
......@@ -213,7 +213,7 @@ type Controller struct {
// NewVarnishController returns an instance of Controller.
//
// log: logger object initialized at startup
// log: logger object initialized at startup
func NewVarnishController(
log *logrus.Logger,
monIntvl time.Duration,
......@@ -564,12 +564,12 @@ func (vc *Controller) updateVarnishSvcAddrs(key string, addrs []vcl.Address,
// AddOrUpdateVarnishSvc causes a sync for the Varnish Service
// identified by namespace/name key.
//
// addrs: list of admin addresses for instances in the Service
// (internal IPs and admin ports)
// secrName: namespace/name of the admin secret to use for the
// Service
// loadVCL: true if the VCL config for the Service should be
// reloaded
// addrs: list of admin addresses for instances in the Service
// (internal IPs and admin ports)
// secrName: namespace/name of the admin secret to use for the
// Service
// loadVCL: true if the VCL config for the Service should be
// reloaded
func (vc *Controller) AddOrUpdateVarnishSvc(
key string,
addrs []vcl.Address,
......@@ -664,11 +664,11 @@ func (vc *Controller) updateBeGauges() {
// Update a Varnish Service to implement an configuration.
//
// svcKey: namespace/name key for the Service
// spec: VCL spec corresponding to the configuration
// ingsMeta: Ingress meta-data
// vcfgMeta: VarnishConfig meta-data
// bcfgMeta: BackendConfig meta-data
// svcKey: namespace/name key for the Service
// spec: VCL spec corresponding to the configuration
// ingsMeta: Ingress meta-data
// vcfgMeta: VarnishConfig meta-data
// bcfgMeta: BackendConfig meta-data
func (vc *Controller) Update(
svcKey string,
spec vcl.Spec,
......@@ -770,11 +770,11 @@ func (vc *Controller) SetNotReady(svcKey string) error {
// HasConfig returns true iff a configuration is already loaded for a
// Varnish Service (so a new sync attempt is not necessary).
//
// svcKey: namespace/name key for the Varnish Service
// spec: VCL specification derived from the configuration
// ingsMeta: Ingress meta-data
// vcfgMeta: VarnishConfig meta-data
// bcfgMeta: BackendConfig meta-data
// svcKey: namespace/name key for the Varnish Service
// spec: VCL specification derived from the configuration
// ingsMeta: Ingress meta-data
// vcfgMeta: VarnishConfig meta-data
// bcfgMeta: BackendConfig meta-data
func (vc *Controller) HasConfig(svcKey string, addrs []vcl.Address,
spec vcl.Spec, ingsMeta map[string]Meta, vcfgMeta Meta,
bcfgMeta map[string]Meta) bool {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment