wire

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Description *TruncatableString `json:"description,omitempty"`
	Attributes  *Attributes        `json:"attributes,omitempty"`
}

type Attribute

type Attribute interface {
	// contains filtered or unexported methods
}

type Attributes

type Attributes struct {
	AttributeMap           map[string]Attribute `json:"attributeMap,omitempty"`
	DroppedAttributesCount int32                `json:"dropped_attributes_count,omitempty"`
}

type BoolAttribute

type BoolAttribute struct {
	BoolValue bool `json:"boolValue,omitempty"`
}

type Bucket

type Bucket struct {
	Count    int64     `json:"count,omitempty"`
	Exemplar *Exemplar `json:"exemplar,omitempty"`
}

type BucketOptions

type BucketOptions interface {
	// contains filtered or unexported methods
}

type BucketOptionsExplicit

type BucketOptionsExplicit struct {
	Bounds []float64 `json:"bounds,omitempty"`
}

func (*BucketOptionsExplicit) MarshalJSON

func (be *BucketOptionsExplicit) MarshalJSON() ([]byte, error)

MarshalJSON creates JSON formatted the same way as jsonpb so that the OpenCensus service can correctly determine the underlying value type. This custom MarshalJSON exists because, by default BucketOptionsExplicit is JSON marshalled as:

{"bounds":[1,2,3]}

but it should be marshalled as:

{"explicit":{"bounds":[1,2,3]}}

type DistributionValue

type DistributionValue struct {
	Count                 int64         `json:"count,omitempty"`
	Sum                   float64       `json:"sum,omitempty"`
	SumOfSquaredDeviation float64       `json:"sum_of_squared_deviation,omitempty"`
	BucketOptions         BucketOptions `json:"bucket_options,omitempty"`
	Buckets               []*Bucket     `json:"buckets,omitempty"`
}

type DoubleAttribute

type DoubleAttribute struct {
	DoubleValue float64 `json:"doubleValue,omitempty"`
}

type DoubleValue

type DoubleValue struct {
	Value float64 `json:"value,omitempty"`
}

type Exemplar

type Exemplar struct {
	Value       float64           `json:"value,omitempty"`
	Timestamp   *Timestamp        `json:"timestamp,omitempty"`
	Attachments map[string]string `json:"attachments,omitempty"`
}

type ExportMetricsServiceRequest

type ExportMetricsServiceRequest struct {
	Node     *Node     `json:"node,omitempty"`
	Metrics  []*Metric `json:"metrics,omitempty"`
	Resource *Resource `json:"resource,omitempty"`
}

type ExportTraceServiceRequest

type ExportTraceServiceRequest struct {
	Node     *Node     `json:"node,omitempty"`
	Spans    []*Span   `json:"spans,omitempty"`
	Resource *Resource `json:"resource,omitempty"`
}

type Int64Value

type Int64Value struct {
	Value int64 `json:"value,omitempty"`
}

type IntAttribute

type IntAttribute struct {
	IntValue int64 `json:"intValue,omitempty"`
}

type LabelKey

type LabelKey struct {
	Key         string `json:"key,omitempty"`
	Description string `json:"description,omitempty"`
}

type LabelValue

type LabelValue struct {
	Value    string `json:"value,omitempty"`
	HasValue bool   `json:"has_value,omitempty"`
}

type Language

type Language int32
const (
	LanguageGo Language = 4
)

type LibraryInfo

type LibraryInfo struct {
	Language           Language `json:"language,omitempty"`
	ExporterVersion    string   `json:"exporter_version,omitempty"`
	CoreLibraryVersion string   `json:"core_library_version,omitempty"`
}
type Link struct {
	TraceID    []byte      `json:"trace_id,omitempty"`
	SpanID     []byte      `json:"span_id,omitempty"`
	Type       LinkType    `json:"type,omitempty"`
	Attributes *Attributes `json:"attributes,omitempty"`
	TraceState *TraceState `json:"tracestate,omitempty"`
}

type LinkType

type LinkType int32
const (
	UnspecifiedLinkType LinkType = 0
	ChildLinkType       LinkType = 1
	ParentLinkType      LinkType = 2
)
type Links struct {
	Link              []*Link `json:"link,omitempty"`
	DroppedLinksCount int32   `json:"dropped_links_count,omitempty"`
}

type MessageEvent

type MessageEvent struct {
	Type             MessageEventType `json:"type,omitempty"`
	ID               uint64           `json:"id,omitempty"`
	UncompressedSize uint64           `json:"uncompressed_size,omitempty"`
	CompressedSize   uint64           `json:"compressed_size,omitempty"`
}

type MessageEventType

type MessageEventType int32
const (
	UnspecifiedMessageEvent MessageEventType = iota
	SentMessageEvent
	ReceivedMessageEvent
)

type Metric

type Metric struct {
	MetricDescriptor *MetricDescriptor `json:"metric_descriptor,omitempty"`
	Timeseries       []*TimeSeries     `json:"timeseries,omitempty"`
	Resource         *Resource         `json:"resource,omitempty"`
}

type MetricDescriptor

type MetricDescriptor struct {
	Name        string                `json:"name,omitempty"`
	Description string                `json:"description,omitempty"`
	Unit        string                `json:"unit,omitempty"`
	Type        MetricDescriptor_Type `json:"type,omitempty"`
	LabelKeys   []*LabelKey           `json:"label_keys,omitempty"`
}

type MetricDescriptor_Type

type MetricDescriptor_Type int32
const (
	MetricDescriptor_UNSPECIFIED             MetricDescriptor_Type = 0
	MetricDescriptor_GAUGE_INT64             MetricDescriptor_Type = 1
	MetricDescriptor_GAUGE_DOUBLE            MetricDescriptor_Type = 2
	MetricDescriptor_GAUGE_DISTRIBUTION      MetricDescriptor_Type = 3
	MetricDescriptor_CUMULATIVE_INT64        MetricDescriptor_Type = 4
	MetricDescriptor_CUMULATIVE_DOUBLE       MetricDescriptor_Type = 5
	MetricDescriptor_CUMULATIVE_DISTRIBUTION MetricDescriptor_Type = 6
	MetricDescriptor_SUMMARY                 MetricDescriptor_Type = 7
)

type Module

type Module struct {
	Module  *TruncatableString `json:"module,omitempty"`
	BuildID *TruncatableString `json:"build_id,omitempty"`
}

type Node

type Node struct {
	Identifier  *ProcessIdentifier `json:"identifier,omitempty"`
	LibraryInfo *LibraryInfo       `json:"library_info,omitempty"`
	ServiceInfo *ServiceInfo       `json:"service_info,omitempty"`
	Attributes  map[string]string  `json:"attributes,omitempty"`
}

type Point

type Point struct {
	Timestamp *Timestamp `json:"timestamp,omitempty"`
	Value     PointValue `json:"value,omitempty"`
}

func (*Point) MarshalJSON

func (p *Point) MarshalJSON() ([]byte, error)

MarshalJSON creates JSON formatted the same way as jsonpb so that the OpenCensus service can correctly determine the underlying value type. This custom MarshalJSON exists because, by default *Point is JSON marshalled as:

{"value": {"int64Value": 1}}

but it should be marshalled as:

{"int64Value": 1}

type PointDistributionValue

type PointDistributionValue struct {
	DistributionValue *DistributionValue `json:"distributionValue,omitempty"`
}

type PointDoubleValue

type PointDoubleValue struct {
	DoubleValue float64 `json:"doubleValue,omitempty"`
}

type PointInt64Value

type PointInt64Value struct {
	Int64Value int64 `json:"int64Value,omitempty"`
}

type PointSummaryValue

type PointSummaryValue struct {
	SummaryValue *SummaryValue `json:"summaryValue,omitempty"`
}

type PointValue

type PointValue interface {
	// contains filtered or unexported methods
}

type ProcessIdentifier

type ProcessIdentifier struct {
	HostName       string    `json:"host_name,omitempty"`
	Pid            uint32    `json:"pid,omitempty"`
	StartTimestamp Timestamp `json:"start_timestamp,omitempty"`
}

type Resource

type Resource struct {
	Type   string            `json:"type,omitempty"`
	Labels map[string]string `json:"labels,omitempty"`
}

type ServiceInfo

type ServiceInfo struct {
	Name string `json:"name,omitempty"`
}

type Snapshot

type Snapshot struct {
	Count            *Int64Value                  `json:"count,omitempty"`
	Sum              *DoubleValue                 `json:"sum,omitempty"`
	PercentileValues []*SnapshotValueAtPercentile `json:"percentile_values,omitempty"`
}

type SnapshotValueAtPercentile

type SnapshotValueAtPercentile struct {
	Percentile float64 `json:"percentile,omitempty"`
	Value      float64 `json:"value,omitempty"`
}

type Span

type Span struct {
	TraceID                 []byte             `json:"trace_id,omitempty"`
	SpanID                  []byte             `json:"span_id,omitempty"`
	TraceState              *TraceState        `json:"tracestate,omitempty"`
	ParentSpanID            []byte             `json:"parent_span_id,omitempty"`
	Name                    *TruncatableString `json:"name,omitempty"`
	Kind                    SpanKind           `json:"kind,omitempty"`
	StartTime               Timestamp          `json:"start_time,omitempty"`
	EndTime                 Timestamp          `json:"end_time,omitempty"`
	Attributes              *Attributes        `json:"attributes,omitempty"`
	StackTrace              *StackTrace        `json:"stack_trace,omitempty"`
	TimeEvents              *TimeEvents        `json:"time_events,omitempty"`
	Links                   *Links             `json:"links,omitempty"`
	Status                  *Status            `json:"status,omitempty"`
	Resource                *Resource          `json:"resource,omitempty"`
	SameProcessAsParentSpan bool               `json:"same_process_as_parent_span,omitempty"`
	ChildSpanCount          bool               `json:"child_span_count,omitempty"`
}

type SpanKind

type SpanKind int32
const (
	UnspecifiedSpanKind SpanKind = 0
	ServerSpanKind      SpanKind = 1
	ClientSpanKind      SpanKind = 2
)

type StackFrame

type StackFrame struct {
	FunctionName         *TruncatableString `json:"function_name,omitempty"`
	OriginalFunctionName *TruncatableString `json:"original_function_name,omitempty"`
	FileName             *TruncatableString `json:"file_name,omitempty"`
	LineNumber           int64              `json:"line_number,omitempty"`
	ColumnNumber         int64              `json:"column_number,omitempty"`
	LoadModule           *Module            `json:"load_module,omitempty"`
	SourceVersion        *TruncatableString `json:"source_version,omitempty"`
}

type StackFrames

type StackFrames struct {
	Frame              []*StackFrame `json:"frame,omitempty"`
	DroppedFramesCount int32         `json:"dropped_frames_count,omitempty"`
}

type StackTrace

type StackTrace struct {
	StackFrames      *StackFrames `json:"stack_frames,omitempty"`
	StackTraceHashID uint64       `json:"stack_trace_hash_id,omitempty"`
}

type Status

type Status struct {
	Code    int32  `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

type StringAttribute

type StringAttribute struct {
	StringValue *TruncatableString `json:"stringValue,omitempty"`
}

type SummaryValue

type SummaryValue struct {
	Count    *Int64Value  `json:"count,omitempty"`
	Sum      *DoubleValue `json:"sum,omitempty"`
	Snapshot *Snapshot    `json:"snapshot,omitempty"`
}

type TimeEvent

type TimeEvent struct {
	Time         Timestamp     `json:"time,omitempty"`
	MessageEvent *MessageEvent `json:"messageEvent,omitempty"`
	Annotation   *Annotation   `json:"annotation,omitempty"`
}

type TimeEventValue

type TimeEventValue interface {
	// contains filtered or unexported methods
}

type TimeEvents

type TimeEvents struct {
	TimeEvent                 []TimeEvent `json:"timeEvent,omitempty"`
	DroppedAnnotationsCount   int32       `json:"dropped_annotations_count,omitempty"`
	DroppedMessageEventsCount int32       `json:"dropped_message_events_count,omitempty"`
}

type TimeSeries

type TimeSeries struct {
	StartTimestamp *Timestamp    `json:"start_timestamp,omitempty"`
	LabelValues    []*LabelValue `json:"label_values,omitempty"`
	Points         []*Point      `json:"points,omitempty"`
}

type Timestamp

type Timestamp = string

type TraceState

type TraceState struct {
	Entries []*TraceStateEntry `json:"entries,omitempty"`
}

type TraceStateEntry

type TraceStateEntry struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

type TruncatableString

type TruncatableString struct {
	Value              string `json:"value,omitempty"`
	TruncatedByteCount int32  `json:"truncated_byte_count,omitempty"`
}

Jump to

Keyboard shortcuts

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