Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultMaxMemoryCache — лимит кеша логов в памяти по умолчанию (20 Мб) DefaultMaxMemoryCache int64 = 20 << 20 // DefaultMaxFileCache — лимит файлового кеша логов по умолчанию (50 Мб) DefaultMaxFileCache int64 = 50 << 20 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStats ¶ added in v0.1.13
CacheStats — состояние кеша логов.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CacheStats ¶ added in v0.1.13
func (c *Client) CacheStats() CacheStats
CacheStats возвращает текущее состояние кеша неотправленных логов.
type Hook ¶ added in v0.1.6
type Hook struct {
// contains filtered or unexported fields
}
type Option ¶ added in v0.1.13
type Option func(*clientOptions)
Option настраивает параметры клиента.
func WithCacheDir ¶ added in v0.1.13
WithCacheDir задаёт директорию для файлового кеша логов (по умолчанию os.TempDir()/ring-log-cache).
func WithMaxFileCache ¶ added in v0.1.13
WithMaxFileCache задаёт лимит файлового кеша логов в байтах (по умолчанию 50 Мб).
func WithMaxMemoryCache ¶ added in v0.1.13
WithMaxMemoryCache задаёт лимит кеша логов в памяти в байтах (по умолчанию 20 Мб).
type Params ¶ added in v0.1.6
type Params struct {
Address string
Token string
AppName string
IgnoreDir string
// CacheDir — директория файлового кеша логов на случай отсутствия
// связи с сервером (по умолчанию os.TempDir()/ring-log-cache)
CacheDir string
// MaxMemoryCache — лимит кеша логов в памяти в байтах (по умолчанию 20 Мб)
MaxMemoryCache int64
// MaxFileCache — лимит файлового кеша логов в байтах (по умолчанию 50 Мб)
MaxFileCache int64
}
Click to show internal directories.
Click to hide internal directories.