You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/agent/grpc-external/testutils/mock_server_transport_strea...

28 lines
547 B

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package testutils
import "google.golang.org/grpc/metadata"
type MockServerTransportStream struct {
MD metadata.MD
}
func (m *MockServerTransportStream) Method() string {
return ""
}
func (m *MockServerTransportStream) SetHeader(md metadata.MD) error {
return nil
}
func (m *MockServerTransportStream) SendHeader(md metadata.MD) error {
m.MD = metadata.Join(m.MD, md)
return nil
}
func (m *MockServerTransportStream) SetTrailer(md metadata.MD) error {
return nil
}