trace

package
v0.0.0-...-228f33a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 14 Imported by: 75

Documentation

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")
	ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group")
)

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 `` /* 157-byte string literal not displayed */
	// Parents of the event
	Parents              []*Trace `protobuf:"bytes,11,rep,name=parents,proto3" json:"parents,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Trace information

func NewPopulatedTrace

func NewPopulatedTrace(r randyTrace, easy bool) *Trace

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) GetID

func (m *Trace) GetID() string

func (*Trace) GetIDs

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

GetIDs gets the IDs of this Trace

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) MarshalToSizedBuffer

func (m *Trace) MarshalToSizedBuffer(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) 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

func (*Trace) XXX_DiscardUnknown

func (m *Trace) XXX_DiscardUnknown()

func (*Trace) XXX_Marshal

func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trace) XXX_Merge

func (m *Trace) XXX_Merge(src proto.Message)

func (*Trace) XXX_Size

func (m *Trace) XXX_Size() int

func (*Trace) XXX_Unmarshal

func (m *Trace) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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