logdb

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFLUXDB_DATABASE = "fissionFunctionLog"
	INFLUXDB_URL      = "http://influxdb:8086/query"
)
View Source
const (
	INFLUXDB   = "influxdb"
	KUBERNETES = "kubernetes"
)

Variables

This section is empty.

Functions

func GetFunctionPodLogs added in v1.18.0

func GetFunctionPodLogs(ctx context.Context, client cmd.Client, logFilter LogFilter, podLogs *bytes.Buffer) (err error)

FunctionPodLogs : Get logs for a function directly from pod

func NewKubernetesEndpoint added in v1.18.0

func NewKubernetesEndpoint(logDBOptions LogDBOptions) (kubernetesLogs, error)

Types

type ByTimestampSort added in v1.13.0

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

func ByTimestamp added in v1.13.0

func ByTimestamp(entries []LogEntry, desc bool) ByTimestampSort

func (ByTimestampSort) Len added in v1.13.0

func (a ByTimestampSort) Len() int

func (ByTimestampSort) Less added in v1.13.0

func (a ByTimestampSort) Less(i, j int) bool

func (ByTimestampSort) Swap added in v1.13.0

func (a ByTimestampSort) Swap(i, j int)

type InfluxDB

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

func NewInfluxDB

func NewInfluxDB(ctx context.Context, logDBOptions LogDBOptions) (InfluxDB, error)

func (InfluxDB) GetLogs

func (influx InfluxDB) GetLogs(ctx context.Context, filter LogFilter, output *bytes.Buffer) (err error)

type LogDBOptions added in v1.18.0

type LogDBOptions struct {
	Client cmd.Client
}

type LogDatabase

type LogDatabase interface {
	GetLogs(context.Context, LogFilter, *bytes.Buffer) error
}

func GetLogDB

func GetLogDB(dbType string, ctx context.Context, logDBOptions LogDBOptions) (LogDatabase, error)

type LogEntry

type LogEntry struct {
	Timestamp time.Time
	Message   string
	Stream    string
	Sequence  int
	Container string
	Namespace string
	FuncName  string
	FuncUid   string
	Pod       string
}

type LogFilter

type LogFilter struct {
	Pod            string
	PodNamespace   string
	Function       string
	FuncUid        string
	Since          time.Time
	Reverse        bool
	RecordLimit    int
	FunctionObject *v1.Function
	Details        bool
	WarnUser       bool
	AllPods        bool
}

Jump to

Keyboard shortcuts

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