all: Become a Go module (fixes #5148) (#5384)

* go mod init; rm -rf vendor

* tweak proto files and generation

* go mod vendor

* clean up build.go

* protobuf literals in tests

* downgrade gogo/protobuf
This commit is contained in:
Jakob Borg
2018-12-18 12:36:38 +01:00
committed by GitHub
parent 3cc8918eb4
commit 944ddcf768
1410 changed files with 66232 additions and 688356 deletions

9
vendor/github.com/thejerf/suture/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,9 @@
language: go
go:
- 1.1
- 1.2
- 1.3
- 1.4
- 1.5
- 1.6
- tip

91
vendor/github.com/thejerf/suture/README.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
Suture
======
[![Build Status](https://travis-ci.org/thejerf/suture.png?branch=master)](https://travis-ci.org/thejerf/suture)
Suture provides Erlang-ish supervisor trees for Go. "Supervisor trees" ->
"sutree" -> "suture" -> holds your code together when it's trying to die.
This library has hit maturity, and isn't expected to be changed
radically. This can also be imported via gopkg.in/thejerf/suture.v2 .
It is intended to deal gracefully with the real failure cases that can
occur with supervision trees (such as burning all your CPU time endlessly
restarting dead services), while also making no unnecessary demands on the
"service" code, and providing hooks to perform adequate logging with in a
production environment.
[A blog post describing the design decisions](http://www.jerf.org/iri/post/2930)
is available.
This module is fully covered with [godoc](http://godoc.org/github.com/thejerf/suture),
including an example, usage, and everything else you might expect from a
README.md on GitHub. (DRY.)
Code Signing
------------
Starting with the commit after ac7cf8591b, I will be signing this repository
with the ["jerf" keybase account](https://keybase.io/jerf). If you are viewing
this repository through GitHub, you should see the commits as showing as
"verified" in the commit view.
(Bear in mind that due to the nature of how git commit signing works, there
may be runs of unverified commits; what matters is that the top one is signed.)
Aspiration
----------
One of the big wins the Erlang community has with their pervasive OTP
support is that it makes it easy for them to distribute libraries that
easily fit into the OTP paradigm. It ought to someday be considered a good
idea to distribute libraries that provide some sort of supervisor tree
functionality out of the box. It is possible to provide this functionality
without explicitly depending on the Suture library.
Changelog
---------
suture uses semantic versioning.
* 2.0.3
* Accepted PR #23, making the logging functions in the supervisor public.
* Added a new Supervisor method RemoveAndWait, allowing you to make a
best effort way to wait for a service to terminate.
* Accepted PR #24, adding an optional IsCompletable interface that
Services can implement that indicates they do not need to be restarted
upon a normal return.
* 2.0.2
* Fixed issue #21. gccgo doesn't like `case (<-c)`, with the parentheses.
Of course the parens aren't doing anything useful anyhow. No behavior
changes.
* 2.0.1
* __Test code change only__. Addresses the possibility that one of the
tests can spuriously fail if they run in a certain order.
* 2.0.0
* Major version due to change to the signature of the logging methods:
A race condition could occur when the Supervisor rendered the service
name via fmt.Sprintf("%#v"), because fmt examines the entire object
regardless of locks through reflection. 2.0.0 changes the supervisors
to snapshot the Service's name once, when it is added, and to pass it
to the logging methods.
* Removal of use of sync/atomic due to possible brokenness in the Debian
architecture.
* 1.1.2
* TravisCI showed that the fix for 1.1.1 induced a deadlock in Go 1.4 and
before.
* If the supervisor is terminated before a service, the service goroutine
could be orphaned trying the shutdown notification to the supervisor.
This should no longer occur.
* 1.1.1
* Per #14, the fix in 1.1.0 did not actually wait for the Supervisor
to stop.
* 1.1.0
* Per #12, Supervisor.stop now tries to wait for its children before
returning. A careful reading of the original .Stop() contract
says this is the correct behavior.
* 1.0.1
* Fixed data race on the .state variable.
* 1.0.0
* Initial release.

47
vendor/github.com/thejerf/suture/gml generated vendored Normal file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
# This command wraps up the gometalinter invocation in the pre-commit hook
# so it can be used by other things.
# If used in a way that the "lintclean" file is in the current working
# directory, the contents of the lintclean directory will be added to
# this invocation, allowing you to filter out specific failures.
# Rationale:
# --exclude="composite literal uses unkeyed field" \
# jbowers: I disagree with community on this, and side with the Go
# creators. Keyed fields are used when you expect new fields to be
# unimportant to you, and you want to keep compiling, i.e., a new
# option that, since you weren't using it before, probably want to
# keep not using it. By contrast, unkeyed fields are appropriate
# when you expect changes to the struct to really matter to you,
# i.e., it is discovered that something MUST have a bool field added
# or it turns out to be logically gibberish. You can't say that
# one or the other must always be used... each has their place.
#
# -D gocyclo
# jbowers: I consider cyclomatic complexity a bit of a crock.
if [ `which gometalinter` == "" ]; then
echo You need to run the \"install_buildtools\" script.
exit 1
fi
EXTRA_ARGS=
if [ -e lintclean ]; then
EXTRA_ARGS=$(cat lintclean)
fi
gometalinter \
--exclude="composite literal uses unkeyed field" \
-j 4 \
-D gocyclo \
-D aligncheck \
-D gofmt \
-D goimports \
-D gotype \
-D structcheck \
-D varcheck \
$EXTRA_ARGS \
$*

17
vendor/github.com/thejerf/suture/pre-commit generated vendored Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# This ensures all executables build and all tests pass before a commit
# goes through.
set -v
set -e
CWD=`pwd`
go test
./gml .
echo Build succeeds.
exit 0