sample

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Copyright 2020 New Relic Corporation. All rights reserved. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvent

type BaseEvent struct {
	EventType string `json:"eventType"`
	Timestmp  int64  `json:"timestamp"`
	EntityKey string `json:"entityKey"`
}

BaseEvent type specifying properties for all sample events All fields on SampleEvent must be set before it is sent.

func (*BaseEvent) Entity

func (bse *BaseEvent) Entity(key entity.Key)

Entity sets the event entity

func (*BaseEvent) Timestamp

func (bse *BaseEvent) Timestamp(timestamp int64)

Timestamp sets the event timestamp

func (*BaseEvent) Type

func (bse *BaseEvent) Type(eventType string)

Type sets the event type

type Event

type Event interface {
	// Type sets the "eventType" marshallable field
	Type(eventType string)
	// Entity sets the "entityKey" marshallable field
	Entity(key entity.Key)
	// Timestamp sets the "timestamp" marshallable field
	Timestamp(timestamp int64)
}

Event is implemented by any object that can represent an event/sample as long as we can marshal it.

type EventBatch

type EventBatch []Event

EventBatch is a slice of Event

Jump to

Keyboard shortcuts

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