Documentation ¶
Index ¶
- Constants
- func GetBuffer(size int) []byte
- func PutBuffer(b []byte)
- type CreateMsWithShardKeyFunc
- type File
- type FileConfig
- type Http
- type HttpConfig
- type Pusher
- type SnappyReader
- func (r *SnappyReader) Close() error
- func (r *SnappyReader) EnableCompress()
- func (r *SnappyReader) Location() int64
- func (r *SnappyReader) OpenFile(file string) error
- func (r *SnappyReader) ReadBlock() ([]byte, error)
- func (r *SnappyReader) SeekStart(location int64) error
- func (r *SnappyReader) Stat() (os.FileInfo, error)
- type SnappyTail
- type SnappyWriter
Constants ¶
View Source
const (
DefaultTailTimeout = time.Hour
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileConfig ¶
func (*FileConfig) GetDir ¶
func (c *FileConfig) GetDir() string
GetDir get directory of the metric file
func (*FileConfig) GetName ¶
func (c *FileConfig) GetName() string
GetName get name of the metric file
func (*FileConfig) GetSavePath ¶
func (c *FileConfig) GetSavePath() string
GetSavePath generate file names by day
func (*FileConfig) GlobPattern ¶
func (c *FileConfig) GlobPattern() string
GlobPattern get pattern to match metric files
func (*FileConfig) Parser ¶
func (c *FileConfig) Parser()
type HttpConfig ¶
type HttpConfig struct { Username string Password string Https bool EndPoint string Database string RP string Duration time.Duration RepN int Gzipped bool }
func (*HttpConfig) BasicAuth ¶
func (c *HttpConfig) BasicAuth() (string, string)
func (*HttpConfig) CreateURL ¶
func (c *HttpConfig) CreateURL() string
func (*HttpConfig) PushURL ¶
func (c *HttpConfig) PushURL() string
type SnappyReader ¶
type SnappyReader struct {
// contains filtered or unexported fields
}
func NewSnappyReader ¶
func NewSnappyReader() *SnappyReader
func (*SnappyReader) Close ¶
func (r *SnappyReader) Close() error
func (*SnappyReader) EnableCompress ¶
func (r *SnappyReader) EnableCompress()
func (*SnappyReader) Location ¶
func (r *SnappyReader) Location() int64
func (*SnappyReader) OpenFile ¶
func (r *SnappyReader) OpenFile(file string) error
func (*SnappyReader) ReadBlock ¶
func (r *SnappyReader) ReadBlock() ([]byte, error)
func (*SnappyReader) SeekStart ¶
func (r *SnappyReader) SeekStart(location int64) error
type SnappyTail ¶
type SnappyTail struct {
// contains filtered or unexported fields
}
func NewSnappyTail ¶
func NewSnappyTail(timeout time.Duration, compress bool) *SnappyTail
func (*SnappyTail) Close ¶
func (t *SnappyTail) Close()
type SnappyWriter ¶
type SnappyWriter struct {
// contains filtered or unexported fields
}
func NewSnappyWriter ¶
func NewSnappyWriter() *SnappyWriter
func (*SnappyWriter) Close ¶
func (w *SnappyWriter) Close() error
func (*SnappyWriter) EnableCompress ¶
func (w *SnappyWriter) EnableCompress()
func (*SnappyWriter) File ¶
func (w *SnappyWriter) File() *os.File
func (*SnappyWriter) OpenFile ¶
func (w *SnappyWriter) OpenFile(file string) error
func (*SnappyWriter) WriteBlock ¶
func (w *SnappyWriter) WriteBlock(b []byte) error
WriteBlock consists: |4-byte data size|data| 1. write 4-byte data length after compression 2. write data 3. write size=0, indicating EOF
Click to show internal directories.
Click to hide internal directories.