mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-04 07:49:35 +00:00 
			
		
		
		
	
							
								
								
									
										18
									
								
								vendor/github.com/containerd/console/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/containerd/console/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,16 +1,24 @@
 | 
			
		||||
language: go
 | 
			
		||||
go:
 | 
			
		||||
  - "1.10.x"
 | 
			
		||||
  - "1.12.x"
 | 
			
		||||
  - "1.13.x"
 | 
			
		||||
 | 
			
		||||
go_import_path: github.com/containerd/console
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  - GO111MODULE=on
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
  - go get -d
 | 
			
		||||
  - GOOS=openbsd go get -d
 | 
			
		||||
  - GOOS=solaris go get -d
 | 
			
		||||
  - GOOS=windows go get -d
 | 
			
		||||
  - pushd ..; go get -u github.com/vbatts/git-validation; popd
 | 
			
		||||
  - pushd ..; go get -u github.com/kunalkushwaha/ltag; popd
 | 
			
		||||
 | 
			
		||||
before_script:
 | 
			
		||||
  - pushd ..; git clone https://github.com/containerd/project; popd
 | 
			
		||||
 | 
			
		||||
script:
 | 
			
		||||
  - DCO_VERBOSITY=-q ../project/script/validate/dco
 | 
			
		||||
  - ../project/script/validate/fileheader ../project/
 | 
			
		||||
  - travis_wait ../project/script/validate/vendor
 | 
			
		||||
  - go test -race
 | 
			
		||||
  - GOOS=openbsd go build
 | 
			
		||||
  - GOOS=openbsd go test -c
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/github.com/containerd/console/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/containerd/console/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,6 +1,7 @@
 | 
			
		||||
 | 
			
		||||
                                 Apache License
 | 
			
		||||
                           Version 2.0, January 2004
 | 
			
		||||
                        http://www.apache.org/licenses/
 | 
			
		||||
                        https://www.apache.org/licenses/
 | 
			
		||||
 | 
			
		||||
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
 | 
			
		||||
 | 
			
		||||
@@ -175,24 +176,13 @@
 | 
			
		||||
 | 
			
		||||
   END OF TERMS AND CONDITIONS
 | 
			
		||||
 | 
			
		||||
   APPENDIX: How to apply the Apache License to your work.
 | 
			
		||||
 | 
			
		||||
      To apply the Apache License to your work, attach the following
 | 
			
		||||
      boilerplate notice, with the fields enclosed by brackets "[]"
 | 
			
		||||
      replaced with your own identifying information. (Don't include
 | 
			
		||||
      the brackets!)  The text should be enclosed in the appropriate
 | 
			
		||||
      comment syntax for the file format. We also recommend that a
 | 
			
		||||
      file or class name and description of purpose be included on the
 | 
			
		||||
      same "printed page" as the copyright notice for easier
 | 
			
		||||
      identification within third-party archives.
 | 
			
		||||
 | 
			
		||||
   Copyright [yyyy] [name of copyright owner]
 | 
			
		||||
   Copyright The containerd Authors
 | 
			
		||||
 | 
			
		||||
   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
 | 
			
		||||
       https://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,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								vendor/github.com/containerd/console/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										10
									
								
								vendor/github.com/containerd/console/README.md
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -15,3 +15,13 @@ if err := current.SetRaw(); err != nil {
 | 
			
		||||
ws, err := current.Size()
 | 
			
		||||
current.Resize(ws)
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Project details
 | 
			
		||||
 | 
			
		||||
console is a containerd sub-project, licensed under the [Apache 2.0 license](./LICENSE).
 | 
			
		||||
As a containerd sub-project, you will find the:
 | 
			
		||||
 * [Project governance](https://github.com/containerd/project/blob/master/GOVERNANCE.md),
 | 
			
		||||
 * [Maintainers](https://github.com/containerd/project/blob/master/MAINTAINERS),
 | 
			
		||||
 * and [Contributing guidelines](https://github.com/containerd/project/blob/master/CONTRIBUTING.md)
 | 
			
		||||
 | 
			
		||||
information in our [`containerd/project`](https://github.com/containerd/project) repository.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/github.com/containerd/console/console.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/containerd/console/console.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -24,10 +24,17 @@ import (
 | 
			
		||||
 | 
			
		||||
var ErrNotAConsole = errors.New("provided file is not a console")
 | 
			
		||||
 | 
			
		||||
type File interface {
 | 
			
		||||
	io.ReadWriteCloser
 | 
			
		||||
 | 
			
		||||
	// Fd returns its file descriptor
 | 
			
		||||
	Fd() uintptr
 | 
			
		||||
	// Name returns its file name
 | 
			
		||||
	Name() string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Console interface {
 | 
			
		||||
	io.Reader
 | 
			
		||||
	io.Writer
 | 
			
		||||
	io.Closer
 | 
			
		||||
	File
 | 
			
		||||
 | 
			
		||||
	// Resize resizes the console to the provided window size
 | 
			
		||||
	Resize(WinSize) error
 | 
			
		||||
@@ -42,10 +49,6 @@ type Console interface {
 | 
			
		||||
	Reset() error
 | 
			
		||||
	// Size returns the window size of the console
 | 
			
		||||
	Size() (WinSize, error)
 | 
			
		||||
	// Fd returns the console's file descriptor
 | 
			
		||||
	Fd() uintptr
 | 
			
		||||
	// Name returns the console's file name
 | 
			
		||||
	Name() string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// WinSize specifies the window size of the console
 | 
			
		||||
@@ -70,7 +73,7 @@ func Current() Console {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ConsoleFromFile returns a console using the provided file
 | 
			
		||||
func ConsoleFromFile(f *os.File) (Console, error) {
 | 
			
		||||
func ConsoleFromFile(f File) (Console, error) {
 | 
			
		||||
	if err := checkConsole(f); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								vendor/github.com/containerd/console/console_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								vendor/github.com/containerd/console/console_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -58,6 +58,7 @@ type Epoller struct {
 | 
			
		||||
	efd       int
 | 
			
		||||
	mu        sync.Mutex
 | 
			
		||||
	fdMapping map[int]*EpollConsole
 | 
			
		||||
	closeOnce sync.Once
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewEpoller returns an instance of epoller with a valid epoll fd.
 | 
			
		||||
@@ -151,7 +152,11 @@ func (e *Epoller) getConsole(sysfd int) *EpollConsole {
 | 
			
		||||
 | 
			
		||||
// Close closes the epoll fd
 | 
			
		||||
func (e *Epoller) Close() error {
 | 
			
		||||
	return unix.Close(e.efd)
 | 
			
		||||
	closeErr := os.ErrClosed // default to "file already closed"
 | 
			
		||||
	e.closeOnce.Do(func() {
 | 
			
		||||
		closeErr = unix.Close(e.efd)
 | 
			
		||||
	})
 | 
			
		||||
	return closeErr
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// EpollConsole acts like a console but registers its file descriptor with an
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								vendor/github.com/containerd/console/console_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/containerd/console/console_unix.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -47,7 +47,7 @@ func NewPty() (Console, string, error) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type master struct {
 | 
			
		||||
	f        *os.File
 | 
			
		||||
	f        File
 | 
			
		||||
	original *unix.Termios
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -122,7 +122,7 @@ func (m *master) Name() string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// checkConsole checks if the provided file is a console
 | 
			
		||||
func checkConsole(f *os.File) error {
 | 
			
		||||
func checkConsole(f File) error {
 | 
			
		||||
	var termios unix.Termios
 | 
			
		||||
	if tcget(f.Fd(), &termios) != nil {
 | 
			
		||||
		return ErrNotAConsole
 | 
			
		||||
@@ -130,7 +130,7 @@ func checkConsole(f *os.File) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func newMaster(f *os.File) (Console, error) {
 | 
			
		||||
func newMaster(f File) (Console, error) {
 | 
			
		||||
	m := &master{
 | 
			
		||||
		f: f,
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/containerd/console/console_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/containerd/console/console_windows.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -198,7 +198,7 @@ func makeInputRaw(fd windows.Handle, mode uint32) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func checkConsole(f *os.File) error {
 | 
			
		||||
func checkConsole(f File) error {
 | 
			
		||||
	var mode uint32
 | 
			
		||||
	if err := windows.GetConsoleMode(windows.Handle(f.Fd()), &mode); err != nil {
 | 
			
		||||
		return err
 | 
			
		||||
@@ -206,7 +206,7 @@ func checkConsole(f *os.File) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func newMaster(f *os.File) (Console, error) {
 | 
			
		||||
func newMaster(f File) (Console, error) {
 | 
			
		||||
	if f != os.Stdin && f != os.Stdout && f != os.Stderr {
 | 
			
		||||
		return nil, errors.New("creating a console from a file is not supported on windows")
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								vendor/github.com/containerd/console/go.mod
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/containerd/console/go.mod
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
module github.com/containerd/console
 | 
			
		||||
 | 
			
		||||
go 1.13
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	github.com/pkg/errors v0.8.1
 | 
			
		||||
	golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/containerd/console/go.sum
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/containerd/console/go.sum
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
 | 
			
		||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 | 
			
		||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
 | 
			
		||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 | 
			
		||||
							
								
								
									
										12
									
								
								vendor/github.com/containerd/ttrpc/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/containerd/ttrpc/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -4,20 +4,14 @@ go:
 | 
			
		||||
  - "1.12.x"
 | 
			
		||||
 | 
			
		||||
install:
 | 
			
		||||
  # Don't change local go.{mod, sum} by go get tools.
 | 
			
		||||
  #
 | 
			
		||||
  # ref: https://github.com/golang/go/issues/27643
 | 
			
		||||
  - pushd ..; go get -u github.com/vbatts/git-validation; popd
 | 
			
		||||
  - pushd ..; go get -u github.com/kunalkushwaha/ltag; popd
 | 
			
		||||
  - go get -u github.com/vbatts/git-validation
 | 
			
		||||
  - go get -u github.com/kunalkushwaha/ltag
 | 
			
		||||
  - go get -t ./...
 | 
			
		||||
 | 
			
		||||
before_script:
 | 
			
		||||
  - pushd ..; git clone https://github.com/containerd/project; popd
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  GO111MODULE=on
 | 
			
		||||
 | 
			
		||||
script:
 | 
			
		||||
  - DCO_VERBOSITY=-q ../project/script/validate/dco
 | 
			
		||||
  - ../project/script/validate/fileheader ../project/
 | 
			
		||||
  - ../project/script/validate/vendor
 | 
			
		||||
  - go test -race -v ./...
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/github.com/containerd/ttrpc/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/containerd/ttrpc/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -338,12 +338,9 @@ func filterCloseErr(err error) error {
 | 
			
		||||
	case strings.Contains(err.Error(), "use of closed network connection"):
 | 
			
		||||
		return ErrClosed
 | 
			
		||||
	default:
 | 
			
		||||
		// if we have an epipe on a write or econnreset on a read , we cast to errclosed
 | 
			
		||||
		if oerr, ok := err.(*net.OpError); ok && (oerr.Op == "write" || oerr.Op == "read") {
 | 
			
		||||
			serr, sok := oerr.Err.(*os.SyscallError)
 | 
			
		||||
			if sok && ((serr.Err == syscall.EPIPE && oerr.Op == "write") ||
 | 
			
		||||
				(serr.Err == syscall.ECONNRESET && oerr.Op == "read")) {
 | 
			
		||||
 | 
			
		||||
		// if we have an epipe on a write, we cast to errclosed
 | 
			
		||||
		if oerr, ok := err.(*net.OpError); ok && oerr.Op == "write" {
 | 
			
		||||
			if serr, ok := oerr.Err.(*os.SyscallError); ok && serr.Err == syscall.EPIPE {
 | 
			
		||||
				return ErrClosed
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								vendor/github.com/containerd/ttrpc/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								vendor/github.com/containerd/ttrpc/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,13 +0,0 @@
 | 
			
		||||
module github.com/containerd/ttrpc
 | 
			
		||||
 | 
			
		||||
go 1.12
 | 
			
		||||
 | 
			
		||||
require (
 | 
			
		||||
	github.com/gogo/protobuf v1.2.1
 | 
			
		||||
	github.com/pkg/errors v0.8.1
 | 
			
		||||
	github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1
 | 
			
		||||
	github.com/sirupsen/logrus v1.4.2
 | 
			
		||||
	golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5
 | 
			
		||||
	google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69
 | 
			
		||||
	google.golang.org/grpc v1.21.0
 | 
			
		||||
)
 | 
			
		||||
							
								
								
									
										60
									
								
								vendor/github.com/containerd/ttrpc/go.sum
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										60
									
								
								vendor/github.com/containerd/ttrpc/go.sum
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,60 +0,0 @@
 | 
			
		||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 | 
			
		||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
 | 
			
		||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
 | 
			
		||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 | 
			
		||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 | 
			
		||||
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
 | 
			
		||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
 | 
			
		||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 | 
			
		||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 | 
			
		||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 | 
			
		||||
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
 | 
			
		||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 | 
			
		||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
 | 
			
		||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
 | 
			
		||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
 | 
			
		||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
 | 
			
		||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
 | 
			
		||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
 | 
			
		||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 | 
			
		||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 | 
			
		||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 | 
			
		||||
github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1 h1:Lo6mRUjdS99f3zxYOUalftWHUoOGaDRqFk1+j0Q57/I=
 | 
			
		||||
github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
 | 
			
		||||
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
 | 
			
		||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
 | 
			
		||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 | 
			
		||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
 | 
			
		||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 | 
			
		||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 | 
			
		||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 | 
			
		||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 | 
			
		||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
 | 
			
		||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 | 
			
		||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 | 
			
		||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 | 
			
		||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 | 
			
		||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
 | 
			
		||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 | 
			
		||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 | 
			
		||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 | 
			
		||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 | 
			
		||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 | 
			
		||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 | 
			
		||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 | 
			
		||||
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5 h1:f005F/Jl5JLP036x7QIvUVhNTqxvSYwFIiyOh2q12iU=
 | 
			
		||||
golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 | 
			
		||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 | 
			
		||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 | 
			
		||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 | 
			
		||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
 | 
			
		||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
 | 
			
		||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 | 
			
		||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 | 
			
		||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
 | 
			
		||||
google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69 h1:4rNOqY4ULrKzS6twXa619uQgI7h9PaVd4ZhjFQ7C5zs=
 | 
			
		||||
google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
 | 
			
		||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
 | 
			
		||||
google.golang.org/grpc v1.21.0 h1:G+97AoqBnmZIT91cLG/EkCoK9NSelj64P8bOHHNmGn0=
 | 
			
		||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
 | 
			
		||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/github.com/containerd/ttrpc/services.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/containerd/ttrpc/services.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -21,7 +21,6 @@ import (
 | 
			
		||||
	"io"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path"
 | 
			
		||||
	"unsafe"
 | 
			
		||||
 | 
			
		||||
	"github.com/gogo/protobuf/proto"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
@@ -96,10 +95,6 @@ func (s *serviceSet) dispatch(ctx context.Context, serviceName, methodName strin
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if isNil(resp) {
 | 
			
		||||
		return nil, errors.New("ttrpc: marshal called with nil")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	switch v := resp.(type) {
 | 
			
		||||
	case proto.Message:
 | 
			
		||||
		r, err := proto.Marshal(v)
 | 
			
		||||
@@ -159,7 +154,3 @@ func convertCode(err error) codes.Code {
 | 
			
		||||
func fullPath(service, method string) string {
 | 
			
		||||
	return "/" + path.Join(service, method)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func isNil(resp interface{}) bool {
 | 
			
		||||
	return (*[2]uintptr)(unsafe.Pointer(&resp))[1] == 0
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user