trace

package
v2.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package trace is a generated protocol buffer package.

It is generated from these files:

github.com/TheThingsNetwork/ttn/api/trace/trace.proto

It has these top-level messages:

Trace

Index

Constants

View Source
const (
	AcceptEvent        = "accept"
	BuildDownlinkEvent = "build downlink"
	CheckMICEvent      = "check mic"
	DeduplicateEvent   = "deduplicate"
	DropEvent          = "drop"
	ForwardEvent       = "forward"
	HandleMACEvent     = "handle mac command"
	ReceiveEvent       = "receive"
	SendEvent          = "send"
	UpdateStateEvent   = "update state"
)

Event types

Variables

View Source
var (
	ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTrace   = fmt.Errorf("proto: integer overflow")
)

Functions

func SetComponent

func SetComponent(serviceName, serviceID string)

SetComponent sets the component information

Types

type Trace

type Trace struct {
	// Generated ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Time in Unix nanoseconds
	Time int64 `protobuf:"varint,2,opt,name=time,proto3" json:"time,omitempty"`
	// The ID of the component
	ServiceId string `protobuf:"bytes,3,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
	// The name of the component (router/broker/handler)
	ServiceName string `protobuf:"bytes,4,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// Short event name
	Event string `protobuf:"bytes,5,opt,name=event,proto3" json:"event,omitempty"`
	// metadata for the event
	Metadata map[string]string `` /* 150-byte string literal not displayed */
	// Parents of the event
	Parents []*Trace `protobuf:"bytes,11,rep,name=parents" json:"parents,omitempty"`
}

Trace information

func (*Trace) Descriptor

func (*Trace) Descriptor() ([]byte, []int)

func (*Trace) Equal

func (this *Trace) Equal(that interface{}) bool

func (*Trace) Flatten

func (m *Trace) Flatten() []*Trace

Flatten the trace events and sort by timestamp

func (*Trace) GenID

func (m *Trace) GenID()

GenID generates a random ID

func (*Trace) GetEvent

func (m *Trace) GetEvent() string

func (*Trace) GetIDs

func (m *Trace) GetIDs() (uids []string)

GetIDs gets the IDs of this Trace

func (*Trace) GetId

func (m *Trace) GetId() string

func (*Trace) GetMetadata

func (m *Trace) GetMetadata() map[string]string

func (*Trace) GetParents

func (m *Trace) GetParents() []*Trace

func (*Trace) GetServiceId

func (m *Trace) GetServiceId() string

func (*Trace) GetServiceName

func (m *Trace) GetServiceName() string

func (*Trace) GetTime

func (m *Trace) GetTime() int64

func (*Trace) GoString

func (m *Trace) GoString() (out string)

func (*Trace) Marshal

func (m *Trace) Marshal() (dAtA []byte, err error)

func (*Trace) MarshalTo

func (m *Trace) MarshalTo(dAtA []byte) (int, error)

func (*Trace) ProtoMessage

func (*Trace) ProtoMessage()

func (*Trace) Reset

func (m *Trace) Reset()

func (*Trace) Size

func (m *Trace) Size() (n int)

func (*Trace) String

func (this *Trace) String() string

func (*Trace) Unmarshal

func (m *Trace) Unmarshal(dAtA []byte) error

func (*Trace) VerboseEqual

func (this *Trace) VerboseEqual(that interface{}) error

func (*Trace) WithEvent

func (m *Trace) WithEvent(event string, keyvalue ...interface{}) *Trace

WithEvent returns a new Trace for the event and its metadata, with the original trace as its parent

Jump to

Keyboard shortcuts

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