Repository navigation
v0.2.0
A breaking release that batches everything we had queued, so consumers
migrate once. A JSON-only WebSocket or SSE server no longer links grpc or
protobuf, and the root module no longer requires gorm or Connect. Most callers
only need the import and rename table in UPGRADING.md. The one change in
behaviour is EventStore.Replay, which now iterates instead of copying. The new
hybrid module (tagged hybrid/v0.2.0) serves one proto service over grpcws,
grpc-gateway JSON and Connect v2 with the same JSON on all three.
Breaking
ProtoJSONCodecandBinaryProtoCodecmoved fromservicekit/httpto
servicekit/http/protocodec.SendJsonResponse,ErrorToHttpCode,
WSConnWriteErrorandWSConnJSONReaderWritermoved to
servicekit/http/grpcutil. Behaviour is unchanged, and there are no aliases
(see UPGRADING.md) (issue 17, PR 54).- Go-style initialisms with no deprecated wrappers:
ConnID()(onWSConn,
BiDirStreamConn,SSEConn),ConnIDStr,PingID,JSONGet,
JSONToQueryString,NewJSONRequest,MakeURL,NormalizeWSURL,
DefaultHTTPClientand the QPS clients,grpcutil.SendJSONResponse,
grpcutil.ErrorToHTTPCode. Wire JSON keys are unchanged (issue 56, PR 57). EventStore.Replayreturnsiter.Seq2[StoredEvent, error]instead of a
slice.ReplayAllcollects it.MemoryEventStorereplays without copying,
and without holding its lock while the caller writes each event (issue 20,
PR 57).connectbridgemoved into thehybridmodule, at
servicekit/hybrid/connectbridge.NewConnectStreamBridgetakes any
Sender[T], which v1's*connect.ServerStream[T]still satisfies
(issue 56, PR 57).auth/is deleted. goapplib and oneauth cover it (issue 56, PR 57).- The root
go.modno longer requires gorm or Connect.
Added
servicekit/hybrid, a separate module, serves one proto service over
grpcws, grpc-gateway JSON and Connect from one handler.hybrid.ProtoJSON
gives every transport the same protojson options: by default the gateway
emits zero values and Connect and grpcws don't, so the same message came back
in two shapes.hybrid.Muxmounts the gateway under a prefix so it can't
swallow the other routes.hybrid/demoandmake -C hybrid exerciseshow
it end to end (issue 50, PR 54). It's on Connect v2,
connectrpc.com/connect/v2(issue 55, PR 57).
Changed
servicekit/httpandmiddlewareno longer import grpc or protobuf. A
minimal JSON WebSocket server goes from 14.8 MB to 9.5 MB.
scripts/check-deps.sh(alsomake check-deps) fails CI if either package
picks them up again (issue 17, PR 54).
See UPGRADING.md for the migration table.