From 585d74b8d9a402063ecac1c143310ca6acfe195a Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Mon, 23 Oct 2023 16:40:28 -0400 Subject: [PATCH] Add docs for Codecs and Compression --- vanguard.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vanguard.go b/vanguard.go index 2ceac0f..f26acfe 100644 --- a/vanguard.go +++ b/vanguard.go @@ -36,14 +36,19 @@ import ( ) const ( - CompressionGzip = "gzip" + // CompressionGzip is the name of the gzip compression algorithm. + CompressionGzip = "gzip" + // CompressionIdentity is the name of the "identity" compression algorithm, + // which is the default and indicates no compression. CompressionIdentity = "identity" // TODO: Connect protocol spec also references "br" (Brotli) and "zstd". And gRPC // protocol spec references "deflate" and "snappy". Should we also support // those out of the box? + // CodecProto is the name of the protobuf codec. CodecProto = "proto" - CodecJSON = "json" + // CodecJSON is the name of the JSON codec. + CodecJSON = "json" // TODO: Some grpc impls support "text" out of the box (but not JSON, ironically). // such as the JS impl. Should we also support it out of the box?