rootlog

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const TimeBytesLength = 12

TimeBytesLength is the byte count of the array returned by TimeToBytes

Variables

This section is empty.

Functions

func BytesToTime

func BytesToTime(data []byte) (time.Time, error)

BytesToTime converts a []byte to time.Time

func MaxTime

func MaxTime() time.Time

MaxTime returns the maximum time in go

func MinTime

func MinTime() time.Time

MinTime returns the zero or minimum time

func TimeToBytes

func TimeToBytes(t time.Time) []byte

TimeToBytes convert time.Time to []byte in a sortable way

Types

type RootLog

type RootLog interface {
	general.LoggerFactory

	Open(created time.Time) (general.Logger, error)

	Delete(created time.Time) error

	Range(
		start time.Time,
		reverse bool,
		cb func(created time.Time, name string) bool,
	) error

	RangeLog(
		logCreated time.Time,
		start time.Time,
		reverse bool,
		cb func(created time.Time, message string) bool,
	) error
}

RootLog interface allows managing named logs

func New

func New(rootDB root.Root) (RootLog, general.LoggerFactory, error)

New creates a RootLog

Jump to

Keyboard shortcuts

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