scf begin
This commit is contained in:
parent
efcfce5197
commit
6d0dd67a7d
2 changed files with 78 additions and 0 deletions
20
storage/hybrid/scf/scf.go
Normal file
20
storage/hybrid/scf/scf.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Package scf provide Session Changes Log file
|
||||
package scf
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
type Scf struct {
|
||||
fd *os.File
|
||||
}
|
||||
|
||||
// NewScf open or create if not exists Session Changes Log file
|
||||
func NewScf(fpath string) (scf *Scf, err error) {
|
||||
var fd *os.File
|
||||
if fd, err = os.Create(fpath); err != nil {
|
||||
return nil, fmt.Errorf("can not open(create) SCF file: %s err: %v", fpath, err)
|
||||
}
|
||||
return &Scf{fd}, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue