Documentation ¶
Index ¶
- Variables
- func NewCodec(ctx context.Context, basic baseCodec) *codec
- func NewContext(ctx context.Context) context.Context
- func NewContextWithContextMeta(ctx context.Context, c *ContextMeta) context.Context
- type ContextMeta
- type ContextMetaKey
- type FaultType
- type Faults
- type Generator
- type MessageType
- type RLFI
- func (*RLFI) Descriptor() ([]byte, []int)
- func (m *RLFI) GetDelay() int64
- func (m *RLFI) GetName() string
- func (m *RLFI) GetType() FaultType
- func (*RLFI) ProtoMessage()
- func (m *RLFI) Reset()
- func (m *RLFI) String() string
- func (m *RLFI) XXX_DiscardUnknown()
- func (m *RLFI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RLFI) XXX_Merge(src proto.Message)
- func (m *RLFI) XXX_Size() int
- func (m *RLFI) XXX_Unmarshal(b []byte) error
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- func (m *Record) GetMessageName() string
- func (m *Record) GetService() string
- func (m *Record) GetTimestamp() int64
- func (m *Record) GetType() RecordType
- func (m *Record) GetUuid() string
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) String() string
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type RecordType
- type TFI
- func (*TFI) Descriptor() ([]byte, []int)
- func (m *TFI) GetAfter() []*TFIMeta
- func (m *TFI) GetDelay() int64
- func (m *TFI) GetName() []string
- func (m *TFI) GetType() FaultType
- func (*TFI) ProtoMessage()
- func (m *TFI) Reset()
- func (m *TFI) String() string
- func (m *TFI) XXX_DiscardUnknown()
- func (m *TFI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TFI) XXX_Merge(src proto.Message)
- func (m *TFI) XXX_Size() int
- func (m *TFI) XXX_Unmarshal(b []byte) error
- type TFIMeta
- func (*TFIMeta) Descriptor() ([]byte, []int)
- func (m *TFIMeta) GetAlready() int64
- func (m *TFIMeta) GetName() string
- func (m *TFIMeta) GetTimes() int64
- func (*TFIMeta) ProtoMessage()
- func (m *TFIMeta) Reset()
- func (m *TFIMeta) String() string
- func (m *TFIMeta) XXX_DiscardUnknown()
- func (m *TFIMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TFIMeta) XXX_Merge(src proto.Message)
- func (m *TFIMeta) XXX_Size() int
- func (m *TFIMeta) XXX_Unmarshal(b []byte) error
- type Trace
- func (m *Trace) AppendRecord(record *Record) *Trace
- func (m *Trace) CalFI(records []*Record)
- func (m *Trace) Copy() *Trace
- func (*Trace) Descriptor() ([]byte, []int)
- func (m *Trace) DoFI(name string) error
- func (m *Trace) GetId() int64
- func (m *Trace) GetRecords() []*Record
- func (m *Trace) GetRlfis() []*RLFI
- func (m *Trace) GetTfis() []*TFI
- func (m *Trace) JSONString() string
- func (*Trace) ProtoMessage()
- func (m *Trace) RLFI(name string) error
- func (m *Trace) Reset()
- func (m *Trace) String() string
- func (m *Trace) TFI(name string) error
- func (m *Trace) XXX_DiscardUnknown()
- func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Trace) XXX_Merge(src proto.Message)
- func (m *Trace) XXX_Size() int
- func (m *Trace) XXX_Unmarshal(b []byte) error
- type TraceID
- type Tracer
- type UUID
Constants ¶
This section is empty.
Variables ¶
View Source
var FaultType_name = map[int32]string{
0: "Fault_",
1: "FaultCrash",
2: "FaultDelay",
}
View Source
var FaultType_value = map[string]int32{
"Fault_": 0,
"FaultCrash": 1,
"FaultDelay": 2,
}
View Source
var MessageType_name = map[int32]string{
0: "Message_",
1: "Message_Request",
2: "Message_Response",
}
View Source
var MessageType_value = map[string]int32{
"Message_": 0,
"Message_Request": 1,
"Message_Response": 2,
}
View Source
var RecordType_name = map[int32]string{
0: "Record_",
1: "RecordSend",
2: "RecordReceive",
}
View Source
var RecordType_value = map[string]int32{
"Record_": 0,
"RecordSend": 1,
"RecordReceive": 2,
}
View Source
var ServiceUUID = NewUUID()
View Source
var Store = &store{ traces: map[TraceID]*traces{}, }
Functions ¶
func NewContextWithContextMeta ¶
func NewContextWithContextMeta(ctx context.Context, c *ContextMeta) context.Context
Types ¶
type ContextMeta ¶
type ContextMeta struct {
// contains filtered or unexported fields
}
func NewContextMeta ¶
func NewContextMeta(traceID TraceID, uuid UUID, url string) *ContextMeta
func (*ContextMeta) UUID ¶
func (c *ContextMeta) UUID() UUID
func (*ContextMeta) Url ¶
func (c *ContextMeta) Url() string
type ContextMetaKey ¶
type ContextMetaKey struct{}
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
type MessageType ¶
type MessageType int32
const ( MessageType_Message_ MessageType = 0 MessageType_Message_Request MessageType = 1 MessageType_Message_Response MessageType = 2 )
func (MessageType) EnumDescriptor ¶
func (MessageType) EnumDescriptor() ([]byte, []int)
func (MessageType) String ¶
func (x MessageType) String() string
type RLFI ¶
type RLFI struct { Type FaultType `protobuf:"varint,1,opt,name=type,proto3,enum=tracer.FaultType" json:"type,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Delay int64 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RLFI) Descriptor ¶
func (*RLFI) ProtoMessage ¶
func (*RLFI) ProtoMessage()
func (*RLFI) XXX_DiscardUnknown ¶
func (m *RLFI) XXX_DiscardUnknown()
func (*RLFI) XXX_Unmarshal ¶
type Record ¶
type Record struct { Type RecordType `protobuf:"varint,1,opt,name=type,proto3,enum=tracer.RecordType" json:"type,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` MessageName string `protobuf:"bytes,3,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"` Uuid string `protobuf:"bytes,4,opt,name=uuid,proto3" json:"uuid,omitempty"` Service string `protobuf:"bytes,5,opt,name=service,proto3" json:"service,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Record) Descriptor ¶
func (*Record) GetMessageName ¶
func (*Record) GetService ¶
func (*Record) GetTimestamp ¶
func (*Record) GetType ¶
func (m *Record) GetType() RecordType
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
type RecordType ¶
type RecordType int32
const ( RecordType_Record_ RecordType = 0 RecordType_RecordSend RecordType = 1 RecordType_RecordReceive RecordType = 2 )
func (RecordType) EnumDescriptor ¶
func (RecordType) EnumDescriptor() ([]byte, []int)
func (RecordType) String ¶
func (x RecordType) String() string
type TFI ¶
type TFI struct { Type FaultType `protobuf:"varint,1,opt,name=type,proto3,enum=tracer.FaultType" json:"type,omitempty"` Name []string `protobuf:"bytes,2,rep,name=name,proto3" json:"name,omitempty"` Delay int64 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"` After []*TFIMeta `protobuf:"bytes,4,rep,name=after,proto3" json:"after,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TFI) Descriptor ¶
func (*TFI) ProtoMessage ¶
func (*TFI) ProtoMessage()
func (*TFI) XXX_DiscardUnknown ¶
func (m *TFI) XXX_DiscardUnknown()
func (*TFI) XXX_Unmarshal ¶
type TFIMeta ¶
type TFIMeta struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Times int64 `protobuf:"varint,2,opt,name=times,proto3" json:"times,omitempty"` Already int64 `protobuf:"varint,3,opt,name=already,proto3" json:"already,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TFIMeta) Descriptor ¶
func (*TFIMeta) GetAlready ¶
func (*TFIMeta) ProtoMessage ¶
func (*TFIMeta) ProtoMessage()
func (*TFIMeta) XXX_DiscardUnknown ¶
func (m *TFIMeta) XXX_DiscardUnknown()
func (*TFIMeta) XXX_Marshal ¶
func (*TFIMeta) XXX_Unmarshal ¶
type Trace ¶
type Trace struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Records []*Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` Rlfis []*RLFI `protobuf:"bytes,20,rep,name=rlfis,proto3" json:"rlfis,omitempty"` Tfis []*TFI `protobuf:"bytes,21,rep,name=tfis,proto3" json:"tfis,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Trace) AppendRecord ¶
func (*Trace) Descriptor ¶
func (*Trace) GetRecords ¶
func (*Trace) JSONString ¶
func (*Trace) ProtoMessage ¶
func (*Trace) ProtoMessage()
func (*Trace) XXX_DiscardUnknown ¶
func (m *Trace) XXX_DiscardUnknown()
func (*Trace) XXX_Marshal ¶
func (*Trace) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.