Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrServerClosed = errors.New("server closed")
ErrServerClosed is the error that the server is already closed.
Functions ¶
func Unregister ¶
func Unregister(name string)
Unregister unregisters the protocol from the registry.
Types ¶
type Mock ¶
type Mock struct { Protocol string `yaml:"protocol"` Expect yamlutil.RawMessage `yaml:"expect"` Response yamlutil.RawMessage `yaml:"response"` }
Mock represents a mock.
type MockIterator ¶
type MockIterator struct {
// contains filtered or unexported fields
}
MockIterator is an iterator over Mocks.
func NewMockIterator ¶
func NewMockIterator(mocks []Mock) *MockIterator
New returns a new MockIterator.
func (*MockIterator) Next ¶
func (i *MockIterator) Next() (*Mock, error)
Next returns the next mock.
func (*MockIterator) Stop ¶
func (i *MockIterator) Stop() error
Stop terminates the iteration. It should be called after you finish using the iterator. If mocks not consumed remain returns a MocksRemainError.
type MocksRemainError ¶
type MocksRemainError struct {
// contains filtered or unexported fields
}
MocksRemainError is the error returned by Stop when mocks not consumed remain.
func (*MocksRemainError) Error ¶
func (e *MocksRemainError) Error() string
Error implements error interface.
Click to show internal directories.
Click to hide internal directories.