Documentation ¶
Overview ¶
Package repodiag manages logs and metrics in the repository.
Index ¶
Constants ¶
View Source
const LogBlobPrefix = "_log_"
LogBlobPrefix is a prefix given to text logs stored in repository.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogManager ¶
type LogManager struct {
// contains filtered or unexported fields
}
LogManager manages writing encrypted log blobs to the repository.
func NewLogManager ¶
func NewLogManager(ctx context.Context, w *Writer) *LogManager
NewLogManager creates a new LogManager that will emit logs as repository blobs.
func (*LogManager) Enable ¶
func (m *LogManager) Enable()
Enable enables writing any buffered logs to repository.
func (*LogManager) NewLogger ¶
func (m *LogManager) NewLogger() *zap.SugaredLogger
NewLogger creates new logger.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer manages encryption and asynchronous writing of diagnostic blobs to the repository.
func NewWriter ¶
func NewWriter( st blob.Storage, bc blobcrypto.Crypter, ) *Writer
NewWriter creates a new writer.
Click to show internal directories.
Click to hide internal directories.