getter

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBGetter

type DBGetter struct {
}

DBGetter is responsible for retrieving DB log data

func NewDBGetter

func NewDBGetter() *DBGetter

NewDBGetter is constructor of DBGetter

func (*DBGetter) Retrieve

func (dbg *DBGetter) Retrieve(logID string) ([]byte, error)

Retrieve implements @Interface.Retrieve

type FileGetter

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

FileGetter is responsible for retrieving file log data

func NewFileGetter

func NewFileGetter(baseDir string) *FileGetter

NewFileGetter is constructor of FileGetter

func (*FileGetter) Retrieve

func (fg *FileGetter) Retrieve(logID string) ([]byte, error)

Retrieve implements @Interface.Retrieve

type Interface

type Interface interface {
	// Retrieve the log data of the specified log entry
	//
	// logID string : the id of the log entry. e.g: file name a.log for file log
	//
	// If succeed, log data bytes will be returned
	// otherwise, a non nil error is returned
	Retrieve(logID string) ([]byte, error)
}

Interface defines operations of a log data getter

Jump to

Keyboard shortcuts

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