readers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IBMDockerRegistryTimePattern  = "2006-01-02 15:04:05.000"
	IBMDockerRegistryTimePattern2 = "2006-01-02 15:04:05"
)

Variables

View Source
var (
	IBMObjectStoreMethodPattern                   = regexp.MustCompile(`^REST\.([A-Z]+)\.OBJECT$`)
	ErrUnexpectedIBMObjectStoreMethod             = errors.New("unexpected method")
	ErrUnexpectedIBMObjectStoreFragment           = errors.New("unexpected fragment found for non-GET method")
	ErrIgnoreIBMObjectStoreFragment               = errors.New("ignore fragment trace")
	ErrUnexpectedIBMObjectStoreOverlappedFragment = errors.New("unexpected fragment trace")
)
View Source
var (
	ErrNoData = errors.New("nothing to read")
)

Functions

This section is empty.

Types

type AzureFunctionsReader

type AzureFunctionsReader struct {
	*BaseReader
	// contains filtered or unexported fields
}

func NewAzureFunctionsReader

func NewAzureFunctionsReader(rd io.Reader) *AzureFunctionsReader

func (*AzureFunctionsReader) Read

func (reader *AzureFunctionsReader) Read() (*Record, error)

func (*AzureFunctionsReader) Report

func (reader *AzureFunctionsReader) Report() []string

type BaseReader

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

func NewBaseReader

func NewBaseReader() *BaseReader

func (*BaseReader) Done

func (r *BaseReader) Done(rec *Record)

func (*BaseReader) Read

func (r *BaseReader) Read() (*Record, error)

type IBMDockerRegistryReader

type IBMDockerRegistryReader struct {
	*BaseReader
	// contains filtered or unexported fields
}

func NewIBMDockerRegistryReader

func NewIBMDockerRegistryReader(rd io.Reader) *IBMDockerRegistryReader

func (*IBMDockerRegistryReader) Read

func (reader *IBMDockerRegistryReader) Read() (*Record, error)

func (*IBMDockerRegistryReader) Report

func (reader *IBMDockerRegistryReader) Report() []string

type IBMObjectStoreReader

type IBMObjectStoreReader struct {
	*BaseReader
	// contains filtered or unexported fields
}

func NewIBMObjectStoreReader

func NewIBMObjectStoreReader(rd io.Reader) *IBMObjectStoreReader

func (*IBMObjectStoreReader) Read

func (reader *IBMObjectStoreReader) Read() (*Record, error)

func (*IBMObjectStoreReader) Report

func (reader *IBMObjectStoreReader) Report() []string

type Record

type Record struct {
	// Timestamp Timestamp can be relative.
	Timestamp int64

	// Method Http method in lower case.
	Method string

	// Key Object identifier
	Key string

	// Size Object size
	Size uint64

	// Start Start position of fragment object if supported
	Start uint64

	// End End position of fragment object if supported
	End uint64

	// TTL Lifetime of object
	TTL int64

	// Error Error on reading the record
	Error error
}

type RecordReader

type RecordReader interface {
	Read() (*Record, error)
	Done(*Record)
	Report() []string
}

Jump to

Keyboard shortcuts

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