mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Update client-go to v10.0.0 (Kubernetes 1.13) (#2382)
* Update client-go to v10.0.0 (Kubernetes 1.13) This fix updates client-go to v10.0.0 which matches Kubernetes 1.13 (released several days ago). Other changes in Gopkg.yaml: - Updated apimachinary, api, klog, yaml associated with k8s version go dep will not automatically match the version. - Added [prune] field (otherwise go dep will not prune automatically) Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Updated Gopkg.lock Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Updated vendor for client-go v10.0.0 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
12
vendor/google.golang.org/genproto/.travis.yml
generated
vendored
12
vendor/google.golang.org/genproto/.travis.yml
generated
vendored
@@ -1,12 +0,0 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.6
|
||||
- 1.7
|
||||
- 1.8
|
||||
go_import_path: google.golang.org/genproto
|
||||
|
||||
script:
|
||||
- go test -v ./...
|
||||
- if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
|
||||
go get -u -v cloud.google.com/go/...;
|
||||
fi
|
||||
27
vendor/google.golang.org/genproto/CONTRIBUTING.md
generated
vendored
27
vendor/google.golang.org/genproto/CONTRIBUTING.md
generated
vendored
@@ -1,27 +0,0 @@
|
||||
Want to contribute? Great! First, read this page (including the small print at the end).
|
||||
|
||||
### Before you contribute
|
||||
Before we can use your code, you must sign the
|
||||
[Google Individual Contributor License Agreement]
|
||||
(https://cla.developers.google.com/about/google-individual)
|
||||
(CLA), which you can do online. The CLA is necessary mainly because you own the
|
||||
copyright to your changes, even after your contribution becomes part of our
|
||||
codebase, so we need your permission to use and distribute your code. We also
|
||||
need to be sure of various other things—for instance that you'll tell us if you
|
||||
know that your code infringes on other people's patents. You don't have to sign
|
||||
the CLA until after you've submitted your code for review and a member has
|
||||
approved it, but you must do it before we can put your code into our codebase.
|
||||
Before you start working on a larger contribution, you should get in touch with
|
||||
us first through the issue tracker with your idea so that we can help out and
|
||||
possibly guide you. Coordinating up front makes it much easier to avoid
|
||||
frustration later on.
|
||||
|
||||
### Code reviews
|
||||
All submissions, including submissions by project members, require review. We
|
||||
use Github pull requests for this purpose.
|
||||
|
||||
### The small print
|
||||
Contributions made by corporations are covered by a different agreement than
|
||||
the one above, the
|
||||
[Software Grant and Corporate Contributor License Agreement]
|
||||
(https://cla.developers.google.com/about/google-corporate).
|
||||
28
vendor/google.golang.org/genproto/README.md
generated
vendored
28
vendor/google.golang.org/genproto/README.md
generated
vendored
@@ -1,28 +0,0 @@
|
||||
Go generated proto packages
|
||||
===========================
|
||||
|
||||
[](https://travis-ci.org/google/go-genproto)
|
||||
[](https://godoc.org/google.golang.org/genproto)
|
||||
|
||||
> **IMPORTANT** This repository is currently experimental. The structure
|
||||
> of the contained packages is subject to change. Please see the original
|
||||
> source repositories (listed below) to find out the status of the each
|
||||
> protocol buffer's associated service.
|
||||
|
||||
This repository contains the generated Go packages for common protocol buffer
|
||||
types, and the generated [gRPC][1] code necessary for interacting with Google's gRPC
|
||||
APIs.
|
||||
|
||||
There are two sources for the proto files used in this repository:
|
||||
|
||||
1. [google/protobuf][2]: the code in the `protobuf` and `ptypes` subdirectories
|
||||
is derived from this repo. The messages in `protobuf` are used to describe
|
||||
protocol buffer messages themselves. The messages under `ptypes` define the
|
||||
common well-known types.
|
||||
2. [googleapis/googleapis][3]: the code in the `googleapis` is derived from this
|
||||
repo. The packages here contain types specifically for interacting with Google
|
||||
APIs.
|
||||
|
||||
[1]: http://grpc.io
|
||||
[2]: https://github.com/google/protobuf/
|
||||
[3]: https://github.com/googleapis/googleapis/
|
||||
123
vendor/google.golang.org/genproto/regen.go
generated
vendored
123
vendor/google.golang.org/genproto/regen.go
generated
vendored
@@ -1,123 +0,0 @@
|
||||
// Copyright 2016 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
// +build ignore
|
||||
|
||||
// Regen.go regenerates the genproto repository.
|
||||
//
|
||||
// Regen.go recursively walks through each directory named by given arguments,
|
||||
// looking for all .proto files. (Symlinks are not followed.)
|
||||
// If the pkg_prefix flag is not an empty string,
|
||||
// any proto file without `go_package` option
|
||||
// or whose option does not begin with the prefix is ignored.
|
||||
// Protoc is executed on remaining files,
|
||||
// one invocation per set of files declaring the same Go package.
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var goPkgOptRe = regexp.MustCompile(`(?m)^option go_package = (.*);`)
|
||||
|
||||
func usage() {
|
||||
fmt.Fprintln(os.Stderr, `usage: go run regen.go -go_out=path/to/output [-pkg_prefix=pkg/prefix] roots...
|
||||
|
||||
Most users will not need to run this file directly.
|
||||
To regenerate this repository, run regen.sh instead.`)
|
||||
flag.PrintDefaults()
|
||||
}
|
||||
|
||||
func main() {
|
||||
goOutDir := flag.String("go_out", "", "go_out argument to pass to protoc-gen-go")
|
||||
pkgPrefix := flag.String("pkg_prefix", "", "only include proto files with go_package starting with this prefix")
|
||||
flag.Usage = usage
|
||||
flag.Parse()
|
||||
|
||||
if *goOutDir == "" {
|
||||
log.Fatal("need go_out flag")
|
||||
}
|
||||
|
||||
pkgFiles := make(map[string][]string)
|
||||
walkFn := func(path string, info os.FileInfo, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !info.Mode().IsRegular() || !strings.HasSuffix(path, ".proto") {
|
||||
return nil
|
||||
}
|
||||
pkg, err := goPkg(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pkgFiles[pkg] = append(pkgFiles[pkg], path)
|
||||
return nil
|
||||
}
|
||||
for _, root := range flag.Args() {
|
||||
if err := filepath.Walk(root, walkFn); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
for pkg, fnames := range pkgFiles {
|
||||
if !strings.HasPrefix(pkg, *pkgPrefix) {
|
||||
continue
|
||||
}
|
||||
if out, err := protoc(*goOutDir, flag.Args(), fnames); err != nil {
|
||||
log.Fatalf("error executing protoc: %s\n%s", err, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// goPkg reports the import path declared in the given file's
|
||||
// `go_package` option. If the option is missing, goPkg returns empty string.
|
||||
func goPkg(fname string) (string, error) {
|
||||
content, err := ioutil.ReadFile(fname)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
var pkgName string
|
||||
if match := goPkgOptRe.FindSubmatch(content); len(match) > 0 {
|
||||
pn, err := strconv.Unquote(string(match[1]))
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
pkgName = pn
|
||||
}
|
||||
if p := strings.IndexRune(pkgName, ';'); p > 0 {
|
||||
pkgName = pkgName[:p]
|
||||
}
|
||||
return pkgName, nil
|
||||
}
|
||||
|
||||
// protoc executes the "protoc" command on files named in fnames,
|
||||
// passing go_out and include flags specified in goOut and includes respectively.
|
||||
// protoc returns combined output from stdout and stderr.
|
||||
func protoc(goOut string, includes, fnames []string) ([]byte, error) {
|
||||
args := []string{"--go_out=plugins=grpc:" + goOut}
|
||||
for _, inc := range includes {
|
||||
args = append(args, "-I", inc)
|
||||
}
|
||||
args = append(args, fnames...)
|
||||
return exec.Command("protoc", args...).CombinedOutput()
|
||||
}
|
||||
77
vendor/google.golang.org/genproto/regen.sh
generated
vendored
77
vendor/google.golang.org/genproto/regen.sh
generated
vendored
@@ -1,77 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# This script rebuilds the generated code for the protocol buffers.
|
||||
# To run this you will need protoc and goprotobuf installed;
|
||||
# see https://github.com/golang/protobuf for instructions.
|
||||
# You also need Go and Git installed.
|
||||
|
||||
set -e
|
||||
|
||||
PKG=google.golang.org/genproto
|
||||
PROTO_REPO=https://github.com/google/protobuf
|
||||
PROTO_SUBDIR=src/google/protobuf
|
||||
API_REPO=https://github.com/googleapis/googleapis
|
||||
|
||||
function die() {
|
||||
echo 1>&2 $*
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Sanity check that the right tools are accessible.
|
||||
for tool in go git protoc protoc-gen-go; do
|
||||
q=$(which $tool) || die "didn't find $tool"
|
||||
echo 1>&2 "$tool: $q"
|
||||
done
|
||||
|
||||
root=$(go list -f '{{.Root}}' $PKG/... | head -n1)
|
||||
if [ -z "$root" ]; then
|
||||
die "cannot find root of $PKG"
|
||||
fi
|
||||
|
||||
remove_dirs=
|
||||
trap 'rm -rf $remove_dirs' EXIT
|
||||
|
||||
if [ -z "$PROTOBUF" ]; then
|
||||
proto_repo_dir=$(mktemp -d -t regen-cds-proto.XXXXXX)
|
||||
git clone -q $PROTO_REPO $proto_repo_dir &
|
||||
remove_dirs="$proto_repo_dir"
|
||||
# The protoc include directory is actually the "src" directory of the repo.
|
||||
protodir="$proto_repo_dir/src"
|
||||
else
|
||||
protodir="$PROTOBUF/src"
|
||||
fi
|
||||
|
||||
if [ -z "$GOOGLEAPIS" ]; then
|
||||
apidir=$(mktemp -d -t regen-cds-api.XXXXXX)
|
||||
git clone -q $API_REPO $apidir &
|
||||
remove_dirs="$remove_dirs $apidir"
|
||||
else
|
||||
apidir="$GOOGLEAPIS"
|
||||
fi
|
||||
|
||||
wait
|
||||
|
||||
# Nuke everything, we'll generate them back
|
||||
rm -r googleapis/ protobuf/
|
||||
|
||||
go run regen.go -go_out "$root/src" -pkg_prefix "$PKG" "$apidir" "$protodir"
|
||||
|
||||
# Sanity check the build.
|
||||
echo 1>&2 "Checking that the libraries build..."
|
||||
go build -v ./...
|
||||
|
||||
echo 1>&2 "All done!"
|
||||
Reference in New Issue
Block a user