code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// 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 mysqlctl
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"code.google.com/p/vitess/go/ioutil2"
"code.... | Go |
// 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 mysqlctl
import (
"expvar"
"fmt"
"os"
"path"
"strconv"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/rpcwrap"
e... | Go |
// 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 mysqlctl
import (
"bufio"
// "crypto/md5"
"encoding/hex"
"fmt"
"hash"
// "hash/crc64"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"os"
"path"
... | Go |
// 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.
/*
Commands for controlling an external mysql process.
Some commands are issued as exec'd tools, some are handled by connecting via
the mysql protocol.
*/
packag... | Go |
package csvsplitter
import (
"bufio"
"bytes"
"io"
"strconv"
"code.google.com/p/vitess/go/vt/key"
)
type KeyspaceCSVReader struct {
reader *bufio.Reader
delim byte
buf *bytes.Buffer
}
func NewKeyspaceCSVReader(r io.Reader, delim byte) *KeyspaceCSVReader {
return &KeyspaceCSVReader{reader: bufio.NewReade... | Go |
// 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 mysqlctl
import (
"bufio"
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"os"
"path"
"strconv"
"strings"
"time"
"code.google.com/p/vites... | Go |
// 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.
// Generate my.cnf files from templates.
package mysqlctl
import (
"bytes"
"fmt"
"io/ioutil"
"path"
"text/template"
"code.google.com/p/vitess/go/vt/env"
... | Go |
// 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 mysqlctl
import (
"fmt"
"io"
"os"
"path"
"code.google.com/p/vitess/go/relog"
vtenv "code.google.com/p/vitess/go/vt/env"
)
/*
-d, --database=name ... | Go |
// 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 proto
import (
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/rpcwrap"
rpcproto "code.google.com/p/vitess/go/rpcwrap/pro... | Go |
// 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 proto
import (
"bytes"
"fmt"
"math"
"time"
"code.google.com/p/vitess/go/bson"
"code.google.com/p/vitess/go/bytes2"
)
func (query *Query) MarshalBs... | Go |
// 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 proto
import (
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/vt/key"
)
type SessionParams struct {
DbName string
Ke... | Go |
// 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 tabletserver
import (
"encoding/gob"
"expvar"
"fmt"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/bson"
"code.google.com/p/vitess/go/relog... | Go |
// 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 tabletserver
import (
"encoding/json"
"fmt"
"regexp"
"strconv"
"code.google.com/p/vitess/go/vt/key"
"code.google.com/p/vitess/go/vt/sqlparser"
)
/... | Go |
// 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 tabletserver
import (
"bytes"
"expvar"
"fmt"
"math/rand"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/mysql"
mproto "code.google.com/p/v... | Go |
// 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 tabletserver
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/tb"
)
const (
FAIL = iota
RETRY
FATAL
TX_POOL_FULL
)... | Go |
// 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 tabletserver
import (
"encoding/binary"
"time"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vitess/go/stats"
"code.google.com/p/vitess/... | Go |
// 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 tabletserver
import (
"encoding/json"
"fmt"
"net/url"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/rpcwrap/pr... | Go |
// 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 tabletserver
import (
"encoding/json"
"fmt"
"net/http"
"strconv"
"sync"
"time"
"code.google.com/p/vitess/go/cache"
mproto "code.google.com/p/vite... | Go |
// 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 tabletserver
import (
"sync"
"time"
"code.google.com/p/vitess/go/hack"
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go... | Go |
// 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 tabletserver
import (
"encoding/base64"
"encoding/binary"
"fmt"
"hash/fnv"
"regexp"
"strconv"
"strings"
"code.google.com/p/vitess/go/relog"
"cod... | Go |
// 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 tabletserver
import (
"net/http"
"sync"
"time"
"code.google.com/p/vitess/go/memcache"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess... | Go |
// 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 tabletserver
import (
"fmt"
"time"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sync2"
"cod... | Go |
// 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 tabletserver
import (
"fmt"
"net/url"
"strings"
"time"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/... | Go |
// 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 tabletserver
import (
"sync"
"time"
"code.google.com/p/vitess/go/pools"
)
// ConnectionPool re-exposes ResourcePool as a pool of DBConnection objects... | Go |
// 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 tabletserver
import (
"strings"
"time"
"code.google.com/p/vitess/go/mysql"
"code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/re... | Go |
// 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 tabletserver
import (
"net/http"
mproto "code.google.com/p/vitess/go/mysql/proto"
"code.google.com/p/vitess/go/relog"
rpcproto "code.google.com/p/vit... | Go |
// 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 tabletserver
import (
"time"
"code.google.com/p/vitess/go/pools"
"code.google.com/p/vitess/go/sync2"
)
type ReservedPool struct {
pool *pools... | Go |
// 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 tabletserver
import (
"fmt"
"net/http"
"sync"
"sync/atomic"
"time"
"code.google.com/p/vitess/go/cache"
"code.google.com/p/vitess/go/mysql/proto"
)... | Go |
// 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 tabletserver
import (
"bytes"
"encoding/base64"
"fmt"
"strings"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sqltypes"
"code.g... | Go |
// 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 tabletserver
import (
"code.google.com/p/vitess/go/vt/tabletserver/proto"
)
const TRAILING_COMMENT = "_trailingComment"
type nomatch struct{}
type mat... | Go |
// 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 key
import (
"fmt"
)
type KeyError string
func NewKeyError(format string, args ...interface{}) KeyError {
return KeyError(fmt.Sprintf(format, args...)... | Go |
// 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 key
import (
"bytes"
"encoding/binary"
"encoding/hex"
"fmt"
"sort"
"strings"
)
var MinKey = KeyspaceId("")
var MaxKey = KeyspaceId("")
// NOTE(mso... | Go |
// Copyright 2013, 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 concurrency
import (
"fmt"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
)
// ErrorRecorder offers a way to record errors during complex
// a... | Go |
// Copyright 2013, 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 concurrency
import (
"fmt"
"sync"
"code.google.com/p/vitess/go/sync2"
)
// ResourceConstraint combines 3 different features:
// - a WaitGroup to wait... | Go |
// 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 (
"fmt"
"net/url"
"path"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/db"
// FIXME(msolomon) needed for the field mapping. ... | Go |
// 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.
// 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 t... | Go |
// 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 tablet
import (
"strconv"
)
// These numbers should exactly match values defined in dist/mysql-5.1.52/include/mysql/mysql_com.h
const (
VT_DECIMAL ... | Go |
// 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.
// This implements some additional error handling logic to make the client
// more robust in the face of transient problems with easy solutions.
package tablet
im... | Go |
// 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 sqlparser
import (
"bytes"
"fmt"
"code.google.com/p/vitess/go/sqltypes"
)
type ParserError struct {
Message string
}
func NewParserError(format str... | Go |
// 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 sqlparser
import (
"fmt"
"strconv"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/sqltypes"
"code.google.com/p/vitess/go/vt/schema... | Go |
// 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 sqlparser
import (
"bytes"
"fmt"
"io"
"unicode"
"code.google.com/p/vitess/go/sqltypes"
)
const EOFCHAR = 0x100
type Tokenizer struct {
InStream ... | Go |
// 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 sqlparser
import (
"strconv"
"code.google.com/p/vitess/go/vt/key"
)
const (
ROUTE_BY_CONDITION = iota
ROUTE_BY_VALUE
)
const (
EID_NODE = iota
VA... | Go |
//line sql.y:33
package sqlparser
import __yyfmt__ "fmt"
//line sql.y:33
func SetParseTree(yylex interface{}, root *Node) {
tn := yylex.(*Tokenizer)
tn.ParseTree = root
}
func SetAllowComments(yylex interface{}, allow bool) {
tn := yylex.(*Tokenizer)
tn.AllowComments = allow
}
func ForceEOF(yylex interface{}) {... | Go |
// 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 sqlparser
import (
"bytes"
"encoding/json"
"strconv"
"code.google.com/p/vitess/go/sqltypes"
)
type BindLocation struct {
Offset, Length int
}
type... | Go |
// Copyright 2013, 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 zktopo
import (
"fmt"
"path"
"sort"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/topo"
"code.google.com/p... | Go |
// Copyright 2013, 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 zktopo
import (
"fmt"
"math/rand"
"path"
"sort"
"strconv"
"strings"
"time"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relo... | Go |
// Copyright 2013, 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 zktopo
import (
"expvar"
"fmt"
"path"
"sort"
"time"
"code.google.com/p/vitess/go/vt/topo"
"code.google.com/p/vitess/go/zk"
"launchpad.net/gozk/zo... | Go |
// 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 env defines and initializes command line flags that control
// the runtime environment.
//
// After the main program has called flag.Parse, it needs to ... | Go |
// 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 tabletmanager
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/rpcwrap"
rpcproto "code.google.com/p/vitess/go/rpcwrap/... | Go |
// 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 tabletmanager
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"os"
"os/signal"
"path"
"strings"
"syscall"
"time"
"code.google... | Go |
// 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.
// Actions modify the state of a tablet, shard or keyspace.
//
// They are currenty managed through a series of queues stored in topology server.
package tabletma... | Go |
// 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.
// Actions modify the state of a tablet, shard or keyspace.
//
// They are stored in topology server and form a queue. Only the
// lowest action id should be execu... | Go |
// 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.
/*
The agent listens on an action node for new actions to perform.
It passes them off to a separate action process. Even though some
actions could be completed in... | Go |
// 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 topo
import (
"encoding/json"
"fmt"
"path"
"sync"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/vt/key"
)
// Functions for deal... | Go |
// Copyright 2013, 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 topo
import (
"encoding/json"
"fmt"
"path"
"sort"
"strconv"
"strings"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/netutil"
... | Go |
// Copyright 2013, 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 topo
import (
"errors"
"fmt"
"os"
"time"
"code.google.com/p/vitess/go/relog"
)
var (
// ErrNodeExists is returned by functions to specify the
// ... | Go |
// 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 topo
import (
"encoding/json"
"fmt"
"sort"
"code.google.com/p/vitess/go/vt/key"
)
// SrvShard contains a roll-up of the shard in the local namespace... | Go |
// 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 topo
/*
Handle logical name resolution - sort of like DNS but tailored to
vt and using the topology server.
Naming is disconnected from the backend disco... | Go |
// 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 wrangler
import (
"fmt"
"sort"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/concurrency"
"code.google.com/... | Go |
package wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.google.com/p/vitess/go/vt/topo"
)
// Assume the master is dead and not coming back. Just push your way
// forward. Force means we are reparenting to the same master
// (assuming the data h... | Go |
// Copyright 2013, 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 wrangler
import (
"fmt"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/concurrency"
tm "code.google.com/p/vitess/go/vt/t... | Go |
package wrangler
import (
"fmt"
"sort"
"strings"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/hook"
"code.google.com/p/vitess/go/vt/mysqlctl"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.google.com/p/vitess/go/vt/topo"
)
// helper struct to queue up results
t... | Go |
package wrangler
import (
"fmt"
"path"
"sort"
"strings"
"code.google.com/p/vitess/go/jscfg"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/topo"
"code.google.com/p/vitess/go/vt/zktopo"
"code.google.com/p/vitess/go/zk"
"code.google.com/p/vitess/go/zk/zkns"
"launchpad.net/gozk/zookeeper"... | Go |
// 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 wrangler
/*
Assume a graph of mysql nodes.
Replace node N with X.
Connect to N and record file/position from "show master status"
On N: (Demote Master)... | Go |
// 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 wrangler
import (
"fmt"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/concurrency"
"code.google.com/p/vitess/go/vt/key"... | Go |
// 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 wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/key"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"... | Go |
// Copyright 2013, 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 wrangler
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sort"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vi... | Go |
// 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 wrangler
import (
"fmt"
"net"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
tm "code.google.com/p/vitess/go/vt/tabletmanager"
"code.google.com... | Go |
// 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 wrangler
import (
"fmt"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/key"
tm "code.google.com/p/vitess/go/v... | Go |
// 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 wrangler
import (
"reflect"
"sort"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/topo"
)
// If error is not nil, the r... | Go |
// 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 wrangler
import (
"fmt"
"sort"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/concurrency"
"code.google.com/p/vitess/go... | Go |
// 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 wrangler
import (
"fmt"
"strings"
"time"
"code.google.com/p/vitess/go/relog"
hk "code.google.com/p/vitess/go/vt/hook"
"code.google.com/p/vitess/go/... | Go |
// 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 wrangler
import (
"fmt"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/concurrency"
tm "code.google.com/p/vitess/go/vt/t... | Go |
package wrangler
import (
"sort"
"strconv"
"strings"
"code.google.com/p/vitess/go/vt/topo"
)
// TabletNodesByType maps tablet types to slices of tablet nodes.
type TabletNodesByType map[string][]*TabletNode
// ShardNodes represents all tablet nodes for a shard. The keys are
// string representations of tablet t... | Go |
// 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 wrangler
import (
"fmt"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/vt/topo"
)
func (wr *Wrangler) reparentShardGraceful(slaveTa... | Go |
// 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 rpc
// RPC structs shared between many components
type UnusedRequest string
var NilRequest = new(UnusedRequest)
type UnusedResponse string
var NilResp... | Go |
// 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.
// relog provides an alternate logger api with support for logging
// levels. Although flexible, the recommended usage is to create a
// logger object, set it as ... | Go |
// 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.
/*
This packages contains a few utility functions for network related functions.
*/
package netutil
import (
"fmt"
"math/rand"
"net"
"os"
"sort"
"strconv"
... | Go |
// 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 zk
// contains the structures used for RPC calls to zkocc.
import (
"time"
)
type ZkStat struct {
czxid int64
mzxid int64
cTime ... | Go |
// 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 zk
import (
"math/rand"
"strings"
"time"
"launchpad.net/gozk/zookeeper"
)
type Stat interface {
Czxid() int64
Mzxid() int64
CTime() time.Time
MT... | Go |
// 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 zk
// Contains the bson custom marshaler / unmarshaler.
// Note this is not required, but makes the code faster.
import (
"bytes"
"code.google.com/p/vi... | Go |
// 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 zkocc
import (
"bytes"
"errors"
"expvar"
"fmt"
"strings"
"sync"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/stats"
"code.go... | Go |
// 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 zkocc
import (
"bytes"
"flag"
"fmt"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/stats"
"code.google.com/p/vite... | Go |
// 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.
// cache for zkocc
package zkocc
import (
"fmt"
"sync"
"time"
"code.google.com/p/vitess/go/relog"
"code.google.com/p/vitess/go/zk"
"launchpad.net/gozk/zook... | Go |
// Copyright 2013, 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 fakezk is a pretty complete mock implementation of a
// Zookeper connection (see go/zk/zk.Conn). All operations
// work as expected with the exceptions ... | Go |
// 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 zk
import (
"code.google.com/p/vitess/go/rpcplus"
"code.google.com/p/vitess/go/rpcwrap/bsonrpc"
"fmt"
"launchpad.net/gozk/zookeeper"
"log"
"math/ran... | Go |
// 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.
/*
Generate zoo.conf files from templates.
*/
package zkctl
import (
"bytes"
"fmt"
"io/ioutil"
"path"
"strconv"
"strings"
"text/template"
"code.google... | Go |
// 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.
/*
Commands for controlling an external zookeeper process.
*/
package zkctl
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"net"
"os"
"os/exec"
"path"
"str... | Go |
// 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 zkns
import (
"encoding/json"
"fmt"
"net"
"strings"
"code.google.com/p/vitess/go/netutil"
"code.google.com/p/vitess/go/zk"
)
type ZknsAddr struct ... | Go |
// 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 zk
import (
"errors"
"fmt"
"log"
"math/rand"
"os"
"path"
"sort"
"strings"
"sync"
"time"
"launchpad.net/gozk/zookeeper"
)
var (
// This error... | Go |
// 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 zk
import (
"bytes"
"fmt"
"log"
"math/rand"
"sync"
"time"
"code.google.com/p/vitess/go/stats"
"launchpad.net/gozk/zookeeper"
)
func init() {
ra... | Go |
// 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 zk
import (
rpc "code.google.com/p/vitess/go/rpcplus"
)
// defines the RPC services for zkocc
// the service name to use is 'ZkReader'
type ZkReader int... | Go |
// 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.
/* Emulate a "global" namespace across n zk quorums. */
package zk
import (
"fmt"
"sort"
"time"
"launchpad.net/gozk/zookeeper"
)
const (
DEFAULT_MAX_RETRIE... | Go |
// 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 zk
import (
"fmt"
"log"
"os"
"strconv"
"time"
"code.google.com/p/vitess/go/sync2"
"launchpad.net/gozk/zookeeper"
)
// Every blocking call into CG... | Go |
// 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 zk
import (
"encoding/json"
"flag"
"fmt"
"log"
"os"
"sort"
"strings"
"time"
// "launchpad.net/gozk/zookeeper"
)
const (
DEFAULT_BASE_TIMEOUT = ... | Go |
// 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 jscfg
// A few simple macros for keeping JSON config files human readable
// and consistent.
import (
"encoding/json"
"fmt"
"io/ioutil"
"code.google... | Go |
package main
import "fmt"
func main() {
fmt.Printf("Hello, world.\n");
}
| Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bind
import (
"bytes"
"fmt"
)
type printer struct {
buf *bytes.Buffer
indentEach []byte
indentText []byte
needIndent bool
}
func (p *pri... | Go |
package bind
import (
"fmt"
"golang.org/x/tools/go/types"
)
// seqType returns a string that can be used for reading and writing a
// type using the seq library.
func seqType(t types.Type) string {
if isErrorType(t) {
return "UTF16"
}
switch t := t.(type) {
case *types.Basic:
switch t.Kind() {
case types... | Go |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package bind implements a code generator for gobind.
//
// See the documentation on the gobind command for usage details.
package bind
// TODO(crawshaw): sl... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.