mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add TagV2 BoundaryMessage envelope protocol (#22520)
Extend the wire protocol for the boundary <-> agent unix socket with a message envelope. The envelope creates a boundary <-> agent data path that is separate from the agent <-> coderd path. This lets boundary send operational metadata (drop counts, configuration like jail type, capabilities) that the agent can act on locally (e.g. Prometheus metrics) or use to enrich outbound requests, without polluting the coderd-facing proto with fields coderd never consumes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,7 @@ func TestReadFrameInvalidTag(t *testing.T) {
|
||||
// reading the invalid tag.
|
||||
const (
|
||||
dataLength uint32 = 10
|
||||
bogusTag uint32 = 2
|
||||
bogusTag uint32 = 222
|
||||
)
|
||||
header := bogusTag<<codec.DataLength | dataLength
|
||||
data := make([]byte, 4)
|
||||
@@ -139,7 +139,7 @@ func TestWriteFrameInvalidTag(t *testing.T) {
|
||||
|
||||
var buf bytes.Buffer
|
||||
data := make([]byte, 1)
|
||||
const bogusTag = 2
|
||||
const bogusTag = 222
|
||||
err := codec.WriteFrame(&buf, codec.Tag(bogusTag), data)
|
||||
require.ErrorIs(t, err, codec.ErrUnsupportedTag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user