olly

package
v0.0.0-...-f33e45f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CloseFlushTimeout = 1 * time.Second
)

Variables

This section is empty.

Functions

func AddErr

func AddErr(event *Event, err error)

AddErr adds "err" field with given value to event

func AddUuid

func AddUuid(fh FieldHolder, fieldName string)

AddUuid inserts newly generated uuid to a builder or event under the given field name

func Close

func Close()

Close shuts down event sending engine

func Init

func Init(svcName string, version string, cfg libhoney.Config, data ...interface{})

Init prepares event sending engine

func Op

func Op(s string) ollyOp

Op() and the associated type are only here to help find Op keys in the code

func QuickC

func QuickC(ollyContext Context, op ollyOp, data ...interface{})

QuickC creates and sends an event in given context

func Send

func Send(event *Event)

Send an event

Types

type Builder

type Builder struct {
	*libhoney.Builder
}

Builder wraps libhoney in case we want to use something else

func NewBuilder

func NewBuilder() *Builder

NewBuilder constructs new builder object

func (*Builder) Clone

func (b *Builder) Clone() *Builder

Clone convenience wrapper for libhoney.Builder.Clone()

func (*Builder) NewEvent

func (b *Builder) NewEvent() *Event

NewEvent type wrapper for libhoney Event

type Context

type Context interface {
	OllyBuilder() *Builder
}

Context helps provide scope builders

type Event

type Event struct {
	*libhoney.Event
}

Event wraps libhoney.Event in case we want to use something else

func AddContext

func AddContext(ev *Event, ollyContext Context) *Event

AddContext Adds fields from context to event

func PrepareC

func PrepareC(ollyContext Context, op ollyOp, data ...interface{}) *Event

PrepareC prepares an event in given context

type FieldHolder

type FieldHolder interface {
	AddField(name string, val interface{})
}

FieldHolder or functions that need to work on both libhoney Builders and Events

Jump to

Keyboard shortcuts

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