{"modulePath":"github.com/UnityTech/client-go","version":"v2.0.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package streaming\n\nPackage streaming implements encoder and decoder for streams of runtime.Objects over io.Writer/Readers.\n\n## Variables\n\n```go\nvar ErrObjectTooLarge = fmt.Errorf(\"object to decode was longer than maximum allowed size\")\n```\n\n## Types\n\n```go\ntype Decoder interface {\n\t// Decode will return io.EOF when no more objects are available.\n\tDecode(defaults *unversioned.GroupVersionKind, into runtime.Object) (runtime.Object, *unversioned.GroupVersionKind, error)\n\t// Close closes the underlying stream.\n\tClose() error\n}\n```\nDecoder is a runtime.Decoder from a stream.\n\n```go\nfunc NewDecoder(r io.ReadCloser, d runtime.Decoder) Decoder\n```\nNewDecoder creates a streaming decoder that reads object chunks from r and decodes them with d. The reader is expected to return ErrShortRead if the provided buffer is not large enough to read an entire object.\n\n```go\ntype Encoder interface {\n\t// Encode will write the provided object to the stream or return an error. It obeys the same\n\t// contract as runtime.VersionedEncoder.\n\tEncode(obj runtime.Object) error\n}\n```\nEncoder is a runtime.Encoder on a stream.\n\n```go\nfunc NewEncoder(w io.Writer, e runtime.Encoder) Encoder\n```\nNewEncoder returns a new streaming encoder.\n\n```go\ntype Serializer interface {\n\tNewEncoder(w io.Writer) Encoder\n\tNewDecoder(r io.ReadCloser) Decoder\n}\n```\nSerializer is a factory for creating encoders and decoders that work over streams.\n\n","path":"github.com/UnityTech/client-go/pkg/runtime/serializer/streaming","name":"streaming","synopsis":"Package streaming implements encoder and decoder for streams of runtime.Objects over io.Writer/Readers.","isRedistributable":true}
