Documentation
¶
Overview ¶
Package backend provides sync backend implementations.
Index ¶
- type ConsoleBackend
- func (c *ConsoleBackend) Close() error
- func (c *ConsoleBackend) Flush(ctx context.Context) error
- func (c *ConsoleBackend) Name() string
- func (c *ConsoleBackend) SendBatch(ctx context.Context, batch *sync.SpanBatch) error
- func (c *ConsoleBackend) SendSpan(ctx context.Context, span *sync.Span) error
- func (c *ConsoleBackend) Stats() Stats
- type ConsoleConfig
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsoleBackend ¶
type ConsoleBackend struct {
// contains filtered or unexported fields
}
ConsoleBackend outputs spans to the console for testing.
func NewConsoleBackend ¶
func NewConsoleBackend(config ConsoleConfig) *ConsoleBackend
NewConsoleBackend creates a new console backend.
func (*ConsoleBackend) Close ¶
func (c *ConsoleBackend) Close() error
Close is a no-op for console backend.
func (*ConsoleBackend) Flush ¶
func (c *ConsoleBackend) Flush(ctx context.Context) error
Flush is a no-op for console backend.
func (*ConsoleBackend) Stats ¶
func (c *ConsoleBackend) Stats() Stats
Stats returns backend statistics.
type ConsoleConfig ¶
type ConsoleConfig struct {
Writer io.Writer
Verbose bool
Format string // "text" or "json"
NoColor bool
}
ConsoleConfig configures the console backend.
func DefaultConsoleConfig ¶
func DefaultConsoleConfig() ConsoleConfig
DefaultConsoleConfig returns default console configuration.
Click to show internal directories.
Click to hide internal directories.