MCPcopy
hub / github.com/nats-io/nats.go / Write

Method Write

nats_test.go:1816–1823  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

1814}
1815
1816func (mc *mockConn) Write(p []byte) (int, error) {
1817 if mc.failures < mc.temporaryFailures {
1818 mc.failures++
1819 return 0, &net.OpError{Op: "write", Net: "tcp", Err: errors.New("i/o timeout")}
1820 }
1821 mc.data = append(mc.data, p...)
1822 return len(p), nil
1823}
1824
1825func (mc *mockConn) SetWriteDeadline(t time.Time) error { return nil }
1826func (mc *mockConn) Read(b []byte) (int, error) { return 0, nil }

Callers 4

TestNKeyOptionFromSeedFunction · 0.45
TestLameDuckModeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected