Documentation
¶
Overview ¶
Package nativelog holds the integration cases for native self-storage of a node's own log events. A suite starts one node at a time and describes how to start it in SharedContext.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DisabledFlags leaves native logging off, its default, and prints info // lines, so a case can see that a node logged a line it did not store. DisabledFlags = []string{"--logging-level=info"} )
Functions ¶
func AwaitQueryable ¶
func AwaitQueryable(conn *grpc.ClientConn)
AwaitQueryable waits until a query of the log stream through conn succeeds. A cluster query fails while the liaison or a data node does not know the stream yet. A truncated answer is still an answer, so it ends the wait.
Types ¶
type Context ¶
type Context struct {
// Start starts a node with native logging on, on a data directory of its
// own.
Start Starter
// StartDisabled starts a node with native logging off, its default.
StartDisabled Starter
// Restart starts a node with native logging on, always on the same data
// directory, so the recovery case can stop one and start the next on the
// data of the first.
Restart Starter
// Console reports what the console has printed in this process.
Console func() string
// Distributed tells the cases that Start returns a data node whose rows
// are read through a liaison, and that the suite owns the node's lifetime.
Distributed bool
// Producer tells the cases that Start returns a producer with no storage
// engine, such as backup or an FODC agent, started in this process after
// the servers it writes to. The lines the process logs are stored under
// its identity, but the startup lines were logged before it started.
Producer bool
}
Context is what a suite provides to the cases.
SharedContext is set by the suite before the specs run.
type Node ¶
type Node struct {
// Conn reaches the node's data.
Conn *grpc.ClientConn
NodeID string
NodeType string
MetricsURL string
}
Node is a running server the cases query.
type Starter ¶
Starter starts one node with extraFlags and returns it with a function that stops it. Only one node runs at a time, because the native sink and its configuration are process-global: a second node in the same process takes the sink over, and a node with native logging off stops collection for the whole process.