mcp: remove the StreamID type (#490)

The streamID type did not carry its weight. Remove it.

Fixes #484.
This commit is contained in:
Robert Findley 2025-09-18 12:01:07 -04:00 • committed by GitHub
commit 353d46ff86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,8 +105,8 @@ func TestScanEvents(t *testing.T) {
func TestMemoryEventStoreState(t *testing.T) {
ctx := context.Background()
appendEvent := func(s *MemoryEventStore, sess string, str StreamID, data string) {
if err := s.Append(ctx, sess, str, []byte(data)); err != nil {
appendEvent := func(s *MemoryEventStore, sess, stream string, data string) {
if err := s.Append(ctx, sess, stream, []byte(data)); err != nil {
t.Fatal(err)
}
}
@ -218,7 +218,7 @@ func TestMemoryEventStoreAfter(t *testing.T) {
for _, tt := range []struct {
sessionID string
streamID StreamID
streamID string
index int
want []string
wantErr string // if non-empty, error should contain this string
@ -277,11 +277,11 @@ func BenchmarkMemoryEventStore(b *testing.B) {
store.SetMaxBytes(test.limit)
ctx := context.Background()
sessionIDs := make([]string, test.sessions)
streamIDs := make([][3]StreamID, test.sessions)
streamIDs := make([][3]string, test.sessions)
for i := range sessionIDs {
sessionIDs[i] = fmt.Sprint(i)
for j := range 3 {
streamIDs[i][j] = StreamID(randText())
streamIDs[i][j] = randText()
}
}
payload := make([]byte, test.datasize)