sqlite

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Now func() time.Time
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(dbFile string) (*Storage, error)

func (*Storage) AddLog

func (s *Storage) AddLog(ctx context.Context, profile string, loggroup string, eventTime time.Time, podName, containerName, nameSpace, log string) error

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) GetLogs

func (s *Storage) GetLogs(ctx context.Context, logGroup string, profile string, podName string, beginDate carbon.Carbon, endDate carbon.Carbon) ([]database.Log, error)

func (*Storage) GetLogsOfPod

func (s *Storage) GetLogsOfPod(ctx context.Context, profile string, logGroup string, podName string, beginDate, endDate time.Time) ([]database.Log, error)

func (*Storage) Init

func (s *Storage) Init() error

func (*Storage) PurgeAll

func (s *Storage) PurgeAll(ctx context.Context) error

func (*Storage) PurgeSpecificLogPodLogs

func (s *Storage) PurgeSpecificLogPodLogs(ctx context.Context, profile string, loggroup string, podName string) error

func (*Storage) PurgeSpecificPeriod

func (s *Storage) PurgeSpecificPeriod(ctx context.Context, profile string, loggroup string, podName string, beginDate carbon.Carbon, endDate carbon.Carbon) error

func (*Storage) SetNow

func (s *Storage) SetNow(now func() time.Time)

Jump to

Keyboard shortcuts

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