{"modulePath":"github.com/devigned/tab","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package tab\n\n## Functions\n\n```go\nfunc NewContext(ctx context.Context, span Spanner) context.Context\n```\nNewContext returns a new context with the given Span attached.\n\n```go\nfunc Register(t Tracer)\n```\nRegister a Tracer instance\n\n## Types\n\n```go\ntype Attribute struct {\n\tKey   string\n\tValue interface{}\n}\n```\nAttribute is a key value pair for decorating spans\n\n```go\nfunc BoolAttribute(key string, value bool) Attribute\n```\nBoolAttribute returns a bool-valued attribute.\n\n```go\nfunc Int64Attribute(key string, value int64) Attribute\n```\nInt64Attribute returns an int64-valued attribute.\n\n```go\nfunc StringAttribute(key, value string) Attribute\n```\nStringAttribute returns a string-valued attribute.\n\n```go\ntype Carrier interface {\n\tSet(key string, value interface{})\n\tGetKeyValues() map[string]interface{}\n}\n```\nCarrier is an abstraction over OpenTracing and OpenCensus propagation carrier\n\n```go\ntype Logger interface {\n\tInfo(msg string, attributes ...Attribute)\n\tError(err error, attributes ...Attribute)\n\tFatal(msg string, attributes ...Attribute)\n\tDebug(msg string, attributes ...Attribute)\n}\n```\nLogger is a generic interface for logging\n\n```go\nfunc For(ctx context.Context) Logger\n```\nFor will return a logger for a given context\n\n```go\ntype NoOpTracer struct{}\n```\nNoOpTracer is a Tracer implementation that does nothing, thus no op\n\n```go\nfunc (nt *NoOpTracer) FromContext(ctx context.Context) Spanner\n```\nFromContext returns a no op Spanner without regard to the input context\n\n```go\nfunc (nt *NoOpTracer) NewContext(parent context.Context, span Spanner) context.Context\n```\nNewContext returns the parent context\n\n```go\nfunc (nt *NoOpTracer) StartSpan(ctx context.Context, operationName string, opts ...interface{}) (context.Context, Spanner)\n```\nStartSpan returns the input context and a no op Spanner\n\n```go\nfunc (nt *NoOpTracer) StartSpanWithRemoteParent(ctx context.Context, operationName string, carrier Carrier, opts ...interface{}) (context.Context, Spanner)\n```\nStartSpanWithRemoteParent returns the input context and a no op Spanner\n\n```go\ntype SpanLogger struct {\n\tSpan Spanner\n}\n```\nSpanLogger is a Logger implementation which logs to a tracing span\n\n```go\nfunc (sl SpanLogger) Debug(msg string, attributes ...Attribute)\n```\nDebug logs a debug tag with message to a span\n\n```go\nfunc (sl SpanLogger) Error(err error, attributes ...Attribute)\n```\nError logs an error tag with message to a span\n\n```go\nfunc (sl SpanLogger) Fatal(msg string, attributes ...Attribute)\n```\nFatal logs an error tag with message to a span\n\n```go\nfunc (sl SpanLogger) Info(msg string, attributes ...Attribute)\n```\nInfo logs an info tag with message to a span\n\n```go\ntype Spanner interface {\n\tAddAttributes(attributes ...Attribute)\n\tEnd()\n\tLogger() Logger\n\tInject(carrier Carrier) error\n\tInternalSpan() interface{}\n}\n```\nSpanner is an abstraction over OpenTracing and OpenCensus Spans\n\n```go\nfunc FromContext(ctx context.Context) Spanner\n```\nFromContext returns the Span stored in a context, or nil if there isn't one.\n\n```go\nfunc StartSpan(ctx context.Context, operationName string, opts ...interface{}) (context.Context, Spanner)\n```\nStartSpan starts a new child span\n\n```go\nfunc StartSpanWithRemoteParent(ctx context.Context, operationName string, carrier Carrier, opts ...interface{}) (context.Context, Spanner)\n```\nStartSpanWithRemoteParent starts a new child span of the span from the given parent.\n\n```go\ntype Tracer interface {\n\tStartSpan(ctx context.Context, operationName string, opts ...interface{}) (context.Context, Spanner)\n\tStartSpanWithRemoteParent(ctx context.Context, operationName string, carrier Carrier, opts ...interface{}) (context.Context, Spanner)\n\tFromContext(ctx context.Context) Spanner\n\tNewContext(parent context.Context, span Spanner) context.Context\n}\n```\nTracer is an abstraction over OpenTracing and OpenCensus trace implementations\n\n","path":"github.com/devigned/tab","name":"tab","synopsis":"","isRedistributable":true}
