зеркало из https://github.com/github/vitess-gh.git
Fixing a number of golint issues.
This commit is contained in:
Родитель
6a6072f290
Коммит
1dc7acf487
|
@ -3,26 +3,26 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package timer provides timer functionality that can be controlled
|
||||
by the user. You start the timer by providing it a callback function,
|
||||
which it will call at the specified interval.
|
||||
Package timer provides timer functionality that can be controlled
|
||||
by the user. You start the timer by providing it a callback function,
|
||||
which it will call at the specified interval.
|
||||
|
||||
var t = timer.NewTimer(1e9)
|
||||
t.Start(KeepHouse)
|
||||
var t = timer.NewTimer(1e9)
|
||||
t.Start(KeepHouse)
|
||||
|
||||
func KeepHouse() {
|
||||
// do house keeping work
|
||||
}
|
||||
func KeepHouse() {
|
||||
// do house keeping work
|
||||
}
|
||||
|
||||
You can stop the timer by calling t.Stop, which is guaranteed to
|
||||
wait if KeepHouse is being executed.
|
||||
You can stop the timer by calling t.Stop, which is guaranteed to
|
||||
wait if KeepHouse is being executed.
|
||||
|
||||
You can create an untimely trigger by calling t.Trigger. You can also
|
||||
schedule an untimely trigger by calling t.TriggerAfter.
|
||||
You can create an untimely trigger by calling t.Trigger. You can also
|
||||
schedule an untimely trigger by calling t.TriggerAfter.
|
||||
|
||||
The timer interval can be changed on the fly by calling t.SetInterval.
|
||||
A zero value interval will cause the timer to wait indefinitely, and it
|
||||
will react only to an explicit Trigger or Stop.
|
||||
The timer interval can be changed on the fly by calling t.SetInterval.
|
||||
A zero value interval will cause the timer to wait indefinitely, and it
|
||||
will react only to an explicit Trigger or Stop.
|
||||
*/
|
||||
package timer
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Copyright 2012, Google Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package client2
|
||||
|
||||
import (
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// API compliant to the requirements of database/sql
|
||||
// Package tablet is an API compliant to the requirements of database/sql
|
||||
// Open expects name to be "hostname:port/keyspace/shard"
|
||||
// For query arguments, we assume place-holders in the query string
|
||||
// in the form of :v0, :v1, etc.
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// This implements some additional error handling logic to make the client
|
||||
// more robust in the face of transient problems with easy solutions.
|
||||
// Package tablet implements some additional error handling logic to
|
||||
// make the client more robust in the face of transient problems with
|
||||
// easy solutions.
|
||||
package tablet
|
||||
|
||||
import (
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// primecache primes the MySQL buffer cache with the rows that are
|
||||
// Package primecache primes the MySQL buffer cache with the rows that are
|
||||
// going to be modified by the replication stream. It only activates
|
||||
// if we're falling behind on replication.
|
||||
package primecache
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
Package agent exports the ActionAgent object. It keeps the local tablet
|
||||
Package tabletmanager exports the ActionAgent object. It keeps the local tablet
|
||||
state, starts / stops all associated services (query service,
|
||||
update stream, binlog players, ...), and handles tabletmanager RPCs
|
||||
to update the state.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// helpers package contains a few utility classes to handle topo.Server
|
||||
// Package helpers contains a few utility classes to handle topo.Server
|
||||
// objects, and transitions from one topo implementation to another.
|
||||
package helpers
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// faketopo contains utitlities for tests that have to interact with a
|
||||
// Package faketopo contains utitlities for tests that have to interact with a
|
||||
// Vitess topology.
|
||||
package faketopo
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// package test contains utilities to test topo.Server
|
||||
// Package test contains utilities to test topo.Server
|
||||
// implementations. If you are testing your implementation, you will
|
||||
// want to call CheckAll in your test method. For an example, look at
|
||||
// the tests in github.com/youtube/vitess/go/vt/zktopo.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// license that can be found in the LICENSE file.
|
||||
|
||||
/*
|
||||
'worker' package contains the framework, utility methods and core
|
||||
Package worker contains the framework, utility methods and core
|
||||
functions for long running actions. 'vtworker' binary will use these.
|
||||
*/
|
||||
package worker
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// wrangler contains the Wrangler object to manage complex topology actions.
|
||||
// Package wrangler contains the Wrangler object to manage complex
|
||||
// topology actions.
|
||||
package wrangler
|
||||
|
||||
import (
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
/* Emulate a "global" namespace across n zk quorums. */
|
||||
// Package zk emulates a "global" namespace across n zk quorums.
|
||||
package zk
|
||||
|
||||
import (
|
||||
|
|
|
@ -42,7 +42,7 @@ func TestLifeCycleGlobal(t *testing.T) {
|
|||
testLifeCycle(t, "1255@voltron:2890:3890:2183", 1255)
|
||||
}
|
||||
|
||||
func testLifeCycle(t *testing.T, config string, myId uint32) {
|
||||
func testLifeCycle(t *testing.T, config string, myID uint32) {
|
||||
currentVtDataRoot := os.Getenv("VTDATAROOT")
|
||||
vtDataRoot := path.Join(os.TempDir(), fmt.Sprintf("VTDATAROOT_%v", getUUID(t)))
|
||||
if err := os.Setenv("VTDATAROOT", vtDataRoot); err != nil {
|
||||
|
@ -57,7 +57,7 @@ func testLifeCycle(t *testing.T, config string, myId uint32) {
|
|||
t.Errorf("cannot remove test VTDATAROOT directory: %v", err)
|
||||
}
|
||||
}()
|
||||
zkConf := MakeZkConfigFromString(config, myId)
|
||||
zkConf := MakeZkConfigFromString(config, myID)
|
||||
zkd := NewZkd(zkConf)
|
||||
if err := zkd.Init(); err != nil {
|
||||
t.Fatalf("Init() err: %v", err)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// To be used with PowerDNS (pdns) as a "pipe backend" CoProcess.
|
||||
// Package pdns provides code to be used with PowerDNS (pdns) as a
|
||||
// "pipe backend" CoProcess.
|
||||
//
|
||||
// Protocol description:
|
||||
// http://downloads.powerdns.com/documentation/html/backends-detail.html#PIPEBACKEND.
|
||||
|
|
Загрузка…
Ссылка в новой задаче