mirror of
https://github.com/rancher/rke.git
synced 2025-09-06 01:10:15 +00:00
Switch to go modules
This commit is contained in:
11
vendor/github.com/ugorji/go/.travis.yml
generated
vendored
11
vendor/github.com/ugorji/go/.travis.yml
generated
vendored
@@ -1,11 +0,0 @@
|
||||
language: go
|
||||
sudo: false
|
||||
go:
|
||||
- 1.7.x # go testing suite support, which we use, was introduced in go 1.7
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- tip
|
||||
script:
|
||||
- go test -tags "alltests" -run Suite -coverprofile coverage.txt github.com/ugorji/go/codec
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
27
vendor/github.com/ugorji/go/README.md
generated
vendored
27
vendor/github.com/ugorji/go/README.md
generated
vendored
@@ -1,27 +0,0 @@
|
||||
[](https://sourcegraph.com/github.com/ugorji/go/-/blob/codec)
|
||||
[](https://travis-ci.org/ugorji/go)
|
||||
[](https://codecov.io/gh/ugorji/go)
|
||||
[](http://godoc.org/github.com/ugorji/go/codec)
|
||||
[](https://goreportcard.com/report/github.com/ugorji/go/codec)
|
||||
[](https://raw.githubusercontent.com/ugorji/go/master/LICENSE)
|
||||
|
||||
# go/codec
|
||||
|
||||
This repository contains the `go-codec` library,
|
||||
a High Performance and Feature-Rich Idiomatic encode/decode and rpc library for
|
||||
|
||||
- msgpack: https://github.com/msgpack/msgpack
|
||||
- binc: http://github.com/ugorji/binc
|
||||
- cbor: http://cbor.io http://tools.ietf.org/html/rfc7049
|
||||
- json: http://json.org http://tools.ietf.org/html/rfc7159
|
||||
|
||||
For more information:
|
||||
|
||||
- [see the codec/Readme for quick usage information](https://github.com/ugorji/go/tree/master/codec#readme)
|
||||
- [view the API on godoc](http://godoc.org/github.com/ugorji/go/codec)
|
||||
- [read the detailed usage/how-to primer](http://ugorji.net/blog/go-codec-primer)
|
||||
|
||||
Install using:
|
||||
|
||||
go get github.com/ugorji/go/codec
|
||||
|
0
vendor/github.com/ugorji/go/codec/test.py
generated
vendored
Executable file → Normal file
0
vendor/github.com/ugorji/go/codec/test.py
generated
vendored
Executable file → Normal file
47
vendor/github.com/ugorji/go/msgpack.org.md
generated
vendored
47
vendor/github.com/ugorji/go/msgpack.org.md
generated
vendored
@@ -1,47 +0,0 @@
|
||||
**MessagePack and [Binc](http://github.com/ugorji/binc) Codec for [Go](http://golang.org) Language.**
|
||||
|
||||
*A High Performance, Feature-Rich, Idiomatic encode/decode and rpc library*.
|
||||
|
||||
To install:
|
||||
|
||||
go get github.com/ugorji/go/codec
|
||||
|
||||
Source: [http://github.com/ugorji/go]
|
||||
Online documentation: [http://godoc.org/github.com/ugorji/go/codec]
|
||||
|
||||
Typical usage:
|
||||
|
||||
```go
|
||||
// create and use decoder/encoder
|
||||
var (
|
||||
v interface{} // value to decode/encode into
|
||||
r io.Reader
|
||||
w io.Writer
|
||||
b []byte
|
||||
mh codec.MsgpackHandle
|
||||
)
|
||||
|
||||
dec = codec.NewDecoder(r, &mh)
|
||||
dec = codec.NewDecoderBytes(b, &mh)
|
||||
err = dec.Decode(&v)
|
||||
|
||||
enc = codec.NewEncoder(w, &mh)
|
||||
enc = codec.NewEncoderBytes(&b, &mh)
|
||||
err = enc.Encode(v)
|
||||
|
||||
//RPC Server
|
||||
go func() {
|
||||
for {
|
||||
conn, err := listener.Accept()
|
||||
rpcCodec := codec.GoRpc.ServerCodec(conn, h)
|
||||
//OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h)
|
||||
rpc.ServeCodec(rpcCodec)
|
||||
}
|
||||
}()
|
||||
|
||||
//RPC Communication (client side)
|
||||
conn, err = net.Dial("tcp", "localhost:5555")
|
||||
rpcCodec := codec.GoRpc.ClientCodec(conn, h)
|
||||
//OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h)
|
||||
client := rpc.NewClientWithCodec(rpcCodec)
|
||||
```
|
Reference in New Issue
Block a user