writer

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path   string `json:"path"`
	Index  string `json:"index"`
	Buffer int    `json:"buffer"`
	Save   int64  `json:"save"`
	Period int64  `json:"period"`
	LogId  int64  `json:"id"`
}

func (*Config) LoadLogId

func (c *Config) LoadLogId()

type Stream

type Stream struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) *Stream

func (*Stream) Add

func (s *Stream) Add(src []byte)

func (*Stream) Inst

func (s *Stream) Inst() *Stream

func (*Stream) Write

func (s *Stream) Write(src []byte)

type Writer

type Writer struct {
	Input chan []byte
	File  *os.File
	// contains filtered or unexported fields
}

func InitWriter

func InitWriter(cfg *Config) *Writer

func (*Writer) Push

func (w *Writer) Push(data []byte)

func (*Writer) Writer

func (w *Writer) Writer()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL