github.com/msales/pkg/v3@v3.24.0/grpcx/middleware/mock_test.go (about)

     1  package middleware_test
     2  
     3  import (
     4  	"context"
     5  
     6  	"google.golang.org/grpc/metadata"
     7  )
     8  
     9  type serverStreamMock struct {
    10  	ctx context.Context
    11  }
    12  
    13  func (*serverStreamMock) SetHeader(metadata.MD) error {
    14  	return nil
    15  }
    16  
    17  func (*serverStreamMock) SendHeader(metadata.MD) error {
    18  	return nil
    19  }
    20  
    21  func (*serverStreamMock) SetTrailer(metadata.MD) {
    22  }
    23  
    24  func (s *serverStreamMock) Context() context.Context {
    25  	return s.ctx
    26  }
    27  
    28  func (*serverStreamMock) SendMsg(m interface{}) error {
    29  	return nil
    30  }
    31  
    32  func (*serverStreamMock) RecvMsg(m interface{}) error {
    33  	return nil
    34  }