Documentation ¶ Index ¶ type File func New() (f *File) func (q *File) Close() func (q *File) Len() int func (q *File) Open(fileName string) (err error) func (q *File) Read(index int) ([]byte, error) func (q *File) Remove() func (q *File) Write(data []byte) (index int, err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type File ¶ type File struct { sync.Mutex FileName string // contains filtered or unexported fields } File is a non-thread safe queue type of fifo based on bytes array. For every push operation index of entry is returned. It can be used to read the entry later func New ¶ func New() (f *File) func (*File) Close ¶ func (q *File) Close() func (*File) Len ¶ func (q *File) Len() int Len returns number of entries kept in queue func (*File) Open ¶ func (q *File) Open(fileName string) (err error) func (*File) Read ¶ func (q *File) Read(index int) ([]byte, error) Get reads entry from index func (*File) Remove ¶ func (q *File) Remove() func (*File) Write ¶ func (q *File) Write(data []byte) (index int, err error) Returns index for pushed data or error if maximum size queue limit is reached. Source Files ¶ View all Source files fileVarint.go Click to show internal directories. Click to hide internal directories.