Skip to content

An append only file store, files are splited by time and size.

License

Notifications You must be signed in to change notification settings

liuzl/filestore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

filestore

An append only file store, files are splited by time and size. Time interval could be day or hour, day by default.

Usage

package main

import (
	"log"

	"github.com/liuzl/filestore"
)

func main() {
	//fs, err := filestore.NewFileStore("db")
	fs, err := filestore.NewFileStorePro("db", "hour")
	if err != nil {
		log.Fatal(err)
	}
	data := []byte("hello world!\n")
	for i := 0; i < 100; i++ {
		if _, err = fs.Write(data); err != nil {
			log.Fatal(err)
		}
	}
	fs.Close()
}

About

An append only file store, files are splited by time and size.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages