axslog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllFlagOK = 3

AllFlagOK : all OK

View Source
var PtimeFlag = 1

PtimeFlag : ptime is exists

View Source
var StatusFlag = 2

StatusFlag : stattus is exists

Functions

func BFloat64 added in v0.0.3

func BFloat64(b []byte) (float64, error)

BFloat64 :

func BInt added in v0.0.3

func BInt(b []byte) (int, error)

BInt :

func FileExists added in v0.0.5

func FileExists(filename string) bool

FileExists :

func SFloat64

func SFloat64(val string) (float64, error)

SFloat64 :

func SInt

func SInt(val string) (int, error)

SInt :

func SearchFileByInode added in v0.0.5

func SearchFileByInode(d string, fstat *FStat) (string, error)

SearchFileByInode :

func WritePos added in v0.0.5

func WritePos(filename string, pos int64, fstat *FStat) error

WritePos :

Types

type FStat added in v0.0.5

type FStat struct {
	Inode uint64
	Dev   uint64
}

FStat :

func FileStat added in v0.0.5

func FileStat(s os.FileInfo) (*FStat, error)

FileStat :

func ReadPos added in v0.0.5

func ReadPos(filename string) (int64, float64, *FStat, error)

ReadPos :

func (*FStat) IsNotRotated added in v0.0.5

func (fstat *FStat) IsNotRotated(lastFstat *FStat) bool

IsNotRotated :

type FilePos added in v0.0.5

type FilePos struct {
	Pos   int64   `json:"pos"`
	Time  float64 `json:"time"`
	Inode uint64  `json:"inode"`
	Dev   uint64  `json:"dev"`
}

FilePos :

type Reader

type Reader interface {
	Parse([]byte) (int, []byte, []byte)
}

Reader :

type Stats added in v0.0.5

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

Stats :

func NewStats added in v0.0.5

func NewStats() *Stats

NewStats :

func (*Stats) Append added in v0.0.5

func (s *Stats) Append(ptime float64, status int)

Append :

func (*Stats) Display added in v0.0.5

func (s *Stats) Display(keyPrefix string, duration float64)

Display :

func (*Stats) GetTotal added in v0.0.5

func (s *Stats) GetTotal() float64

GetTotal :

Jump to

Keyboard shortcuts

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