rkcursor

package
v2.2.22 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddField added in v2.0.10

func AddField(key, val string)

func Click added in v2.0.10

func Click() *pointer

func Error added in v2.0.10

func Error(err error)

func OverrideEntryNameAndType

func OverrideEntryNameAndType(entryName, entryType string)

func OverrideLogger

func OverrideLogger(l *zap.Logger)

func PromLabels added in v2.2.15

func PromLabels() *promLabel

func SummaryVec

func SummaryVec() *prometheus.SummaryVec

Types

type Cursor

type Cursor struct {
	Logger *zap.Logger
	Event  rkquery.Event
	Now    time.Time

	EntryName string
	EntryType string

	Creator PointerCreator
}

func NewCursor

func NewCursor(opts ...Option) *Cursor

func (*Cursor) AddField added in v2.0.10

func (c *Cursor) AddField(key, val string)

func (*Cursor) Click

func (c *Cursor) Click() Pointer

func (*Cursor) Error added in v2.0.10

func (c *Cursor) Error(err error)

type CursorPayload added in v2.2.15

type CursorPayload struct {
	Logger    *zap.Logger
	Event     rkquery.Event
	StartTime time.Time

	EntryName  string
	EntryType  string
	Operation  string
	ParentFunc string
}

type Option

type Option func(c *Cursor)

func WithEntryNameAndType

func WithEntryNameAndType(entryName, entryType string) Option

func WithEvent

func WithEvent(e rkquery.Event) Option

func WithLogger

func WithLogger(l *zap.Logger) Option

type Pointer added in v2.2.15

type Pointer interface {
	PrintError(err error)

	ObserveError(err error) error

	Release()
}

type PointerCreator added in v2.2.15

type PointerCreator func(payload *CursorPayload) Pointer

Jump to

Keyboard shortcuts

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