| // bufferCloser implements io.ReadWriteCloser. |
| type bufferCloser struct { |
| func (*bufferCloser) Close() error { |
| // InMemorySerializer implements Serializer. This Serializer should only be |
| // TODO(ataly, bjornick): Get rid of all uses of this Serializer from non-test |
| // code and use a file backed (or some persistent storage backed) Serializer there |
| type InMemorySerializer struct { |
| func (s *InMemorySerializer) Readers() (io.Reader, io.Reader, error) { |
| return &s.data, &s.signature, nil |
| func (s *InMemorySerializer) Writers() (io.WriteCloser, io.WriteCloser, error) { |
| return &s.data, &s.signature, nil |