Documentation
¶
Index ¶
- func Nodes(n int) []netmap.NodeInfo
- func RandByteSlice[I constraints.Integer](ln I) []byte
- type LogBuffer
- func (x *LogBuffer) AssertContains(e LogEntry)
- func (x *LogBuffer) AssertContainsMsg(lvl zapcore.Level, msg string)
- func (x *LogBuffer) AssertEmpty()
- func (x *LogBuffer) AssertEqual(es []LogEntry)
- func (x *LogBuffer) AssertNotContainsMsg(lvl zapcore.Level, msg string)
- func (x *LogBuffer) AssertSingle(e LogEntry)
- type LogEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Nodes ¶ added in v0.49.0
Nodes returns n netmap.NodeInfo elements with unique public keys.
Each node has two network addresses with localhost IP. Ports are sequential starting from 10000.
func RandByteSlice ¶
func RandByteSlice[I constraints.Integer](ln I) []byte
RandByteSlice returns randomized byte slice of specified length.
Types ¶
type LogBuffer ¶ added in v0.49.0
type LogBuffer struct {
// contains filtered or unexported fields
}
LogBuffer is a memory buffer for zap.Logger entries.
func NewBufferedLogger ¶ added in v0.49.0
NewBufferedLogger returns buffered logger for testing.
Entries with severity less than minLevel are never written.
func (*LogBuffer) AssertContains ¶ added in v0.49.0
AssertContains asserts that log contains at least one given entry.
func (*LogBuffer) AssertContainsMsg ¶ added in v0.50.0
AssertContainsMsg asserts that log contains at least one entry with given message and severity.
func (*LogBuffer) AssertEmpty ¶ added in v0.49.0
func (x *LogBuffer) AssertEmpty()
AssertEmpty asserts that log is empty.
func (*LogBuffer) AssertEqual ¶ added in v0.49.0
AssertEqual asserts that log consists of given ordered entries.
func (*LogBuffer) AssertNotContainsMsg ¶ added in v0.50.0
AssertNotContainsMsg asserts that log does not contain entry with given message and severity.
func (*LogBuffer) AssertSingle ¶ added in v0.49.0
AssertSingle asserts that log has given entry only.