mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
build: move e2e dependencies into e2e/go.mod
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
15da101b1b
commit
bec6090996
77
e2e/vendor/github.com/moby/spdystream/README.md
generated
vendored
Normal file
77
e2e/vendor/github.com/moby/spdystream/README.md
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
# SpdyStream
|
||||
|
||||
A multiplexed stream library using spdy
|
||||
|
||||
## Usage
|
||||
|
||||
Client example (connecting to mirroring server without auth)
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/moby/spdystream"
|
||||
"net"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func main() {
|
||||
conn, err := net.Dial("tcp", "localhost:8080")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
spdyConn, err := spdystream.NewConnection(conn, false)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
go spdyConn.Serve(spdystream.NoOpStreamHandler)
|
||||
stream, err := spdyConn.CreateStream(http.Header{}, nil, false)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
stream.Wait()
|
||||
|
||||
fmt.Fprint(stream, "Writing to stream")
|
||||
|
||||
buf := make([]byte, 25)
|
||||
stream.Read(buf)
|
||||
fmt.Println(string(buf))
|
||||
|
||||
stream.Close()
|
||||
}
|
||||
```
|
||||
|
||||
Server example (mirroring server without auth)
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/moby/spdystream"
|
||||
"net"
|
||||
)
|
||||
|
||||
func main() {
|
||||
listener, err := net.Listen("tcp", "localhost:8080")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for {
|
||||
conn, err := listener.Accept()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
spdyConn, err := spdystream.NewConnection(conn, true)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
go spdyConn.Serve(spdystream.MirrorStreamHandler)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Copyright 2013-2021 Docker, inc. Released under the [Apache 2.0 license](LICENSE).
|
Reference in New Issue
Block a user