tempoapi

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type AnyValue

type AnyValue struct {
	Type        AnyValueType // switch on this field
	StringValue StringValue
	BoolValue   BoolValue
	IntValue    IntValue
	DoubleValue DoubleValue
	ArrayValue  ArrayValue
	KvlistValue KvlistValue
	BytesValue  BytesValue
}

Ref: #/components/schemas/AnyValue AnyValue represents sum type.

func NewArrayValueAnyValue

func NewArrayValueAnyValue(v ArrayValue) AnyValue

NewArrayValueAnyValue returns new AnyValue from ArrayValue.

func NewBoolValueAnyValue

func NewBoolValueAnyValue(v BoolValue) AnyValue

NewBoolValueAnyValue returns new AnyValue from BoolValue.

func NewBytesValueAnyValue

func NewBytesValueAnyValue(v BytesValue) AnyValue

NewBytesValueAnyValue returns new AnyValue from BytesValue.

func NewDoubleValueAnyValue

func NewDoubleValueAnyValue(v DoubleValue) AnyValue

NewDoubleValueAnyValue returns new AnyValue from DoubleValue.

func NewIntValueAnyValue

func NewIntValueAnyValue(v IntValue) AnyValue

NewIntValueAnyValue returns new AnyValue from IntValue.

func NewKvlistValueAnyValue

func NewKvlistValueAnyValue(v KvlistValue) AnyValue

NewKvlistValueAnyValue returns new AnyValue from KvlistValue.

func NewStringValueAnyValue

func NewStringValueAnyValue(v StringValue) AnyValue

NewStringValueAnyValue returns new AnyValue from StringValue.

func (*AnyValue) Decode

func (s *AnyValue) Decode(d *jx.Decoder) error

Decode decodes AnyValue from json.

func (AnyValue) Encode

func (s AnyValue) Encode(e *jx.Encoder)

Encode encodes AnyValue as json.

func (AnyValue) GetArrayValue

func (s AnyValue) GetArrayValue() (v ArrayValue, ok bool)

GetArrayValue returns ArrayValue and true boolean if AnyValue is ArrayValue.

func (AnyValue) GetBoolValue

func (s AnyValue) GetBoolValue() (v BoolValue, ok bool)

GetBoolValue returns BoolValue and true boolean if AnyValue is BoolValue.

func (AnyValue) GetBytesValue

func (s AnyValue) GetBytesValue() (v BytesValue, ok bool)

GetBytesValue returns BytesValue and true boolean if AnyValue is BytesValue.

func (AnyValue) GetDoubleValue

func (s AnyValue) GetDoubleValue() (v DoubleValue, ok bool)

GetDoubleValue returns DoubleValue and true boolean if AnyValue is DoubleValue.

func (AnyValue) GetIntValue

func (s AnyValue) GetIntValue() (v IntValue, ok bool)

GetIntValue returns IntValue and true boolean if AnyValue is IntValue.

func (AnyValue) GetKvlistValue

func (s AnyValue) GetKvlistValue() (v KvlistValue, ok bool)

GetKvlistValue returns KvlistValue and true boolean if AnyValue is KvlistValue.

func (AnyValue) GetStringValue

func (s AnyValue) GetStringValue() (v StringValue, ok bool)

GetStringValue returns StringValue and true boolean if AnyValue is StringValue.

func (AnyValue) IsArrayValue

func (s AnyValue) IsArrayValue() bool

IsArrayValue reports whether AnyValue is ArrayValue.

func (AnyValue) IsBoolValue

func (s AnyValue) IsBoolValue() bool

IsBoolValue reports whether AnyValue is BoolValue.

func (AnyValue) IsBytesValue

func (s AnyValue) IsBytesValue() bool

IsBytesValue reports whether AnyValue is BytesValue.

func (AnyValue) IsDoubleValue

func (s AnyValue) IsDoubleValue() bool

IsDoubleValue reports whether AnyValue is DoubleValue.

func (AnyValue) IsIntValue

func (s AnyValue) IsIntValue() bool

IsIntValue reports whether AnyValue is IntValue.

func (AnyValue) IsKvlistValue

func (s AnyValue) IsKvlistValue() bool

IsKvlistValue reports whether AnyValue is KvlistValue.

func (AnyValue) IsStringValue

func (s AnyValue) IsStringValue() bool

IsStringValue reports whether AnyValue is StringValue.

func (AnyValue) MarshalJSON

func (s AnyValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*AnyValue) SetArrayValue

func (s *AnyValue) SetArrayValue(v ArrayValue)

SetArrayValue sets AnyValue to ArrayValue.

func (*AnyValue) SetBoolValue

func (s *AnyValue) SetBoolValue(v BoolValue)

SetBoolValue sets AnyValue to BoolValue.

func (*AnyValue) SetBytesValue

func (s *AnyValue) SetBytesValue(v BytesValue)

SetBytesValue sets AnyValue to BytesValue.

func (*AnyValue) SetDoubleValue

func (s *AnyValue) SetDoubleValue(v DoubleValue)

SetDoubleValue sets AnyValue to DoubleValue.

func (*AnyValue) SetFake

func (s *AnyValue) SetFake()

SetFake set fake values.

func (*AnyValue) SetIntValue

func (s *AnyValue) SetIntValue(v IntValue)

SetIntValue sets AnyValue to IntValue.

func (*AnyValue) SetKvlistValue

func (s *AnyValue) SetKvlistValue(v KvlistValue)

SetKvlistValue sets AnyValue to KvlistValue.

func (*AnyValue) SetStringValue

func (s *AnyValue) SetStringValue(v StringValue)

SetStringValue sets AnyValue to StringValue.

func (*AnyValue) UnmarshalJSON

func (s *AnyValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (AnyValue) Validate

func (s AnyValue) Validate() error

type AnyValueType

type AnyValueType string

AnyValueType is oneOf type of AnyValue.

const (
	StringValueAnyValue AnyValueType = "StringValue"
	BoolValueAnyValue   AnyValueType = "BoolValue"
	IntValueAnyValue    AnyValueType = "IntValue"
	DoubleValueAnyValue AnyValueType = "DoubleValue"
	ArrayValueAnyValue  AnyValueType = "ArrayValue"
	KvlistValueAnyValue AnyValueType = "KvlistValue"
	BytesValueAnyValue  AnyValueType = "BytesValue"
)

Possible values for AnyValueType.

type ArrayValue

type ArrayValue struct {
	ArrayValue []AnyValue `json:"arrayValue"`
}

Ref: #/components/schemas/ArrayValue

func (*ArrayValue) Decode

func (s *ArrayValue) Decode(d *jx.Decoder) error

Decode decodes ArrayValue from json.

func (*ArrayValue) Encode

func (s *ArrayValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ArrayValue) GetArrayValue

func (s *ArrayValue) GetArrayValue() []AnyValue

GetArrayValue returns the value of ArrayValue.

func (*ArrayValue) MarshalJSON

func (s *ArrayValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ArrayValue) SetArrayValue

func (s *ArrayValue) SetArrayValue(val []AnyValue)

SetArrayValue sets the value of ArrayValue.

func (*ArrayValue) SetFake

func (s *ArrayValue) SetFake()

SetFake set fake values.

func (*ArrayValue) UnmarshalJSON

func (s *ArrayValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ArrayValue) Validate

func (s *ArrayValue) Validate() error

type Attributes

type Attributes []KeyValue

func (*Attributes) Decode

func (s *Attributes) Decode(d *jx.Decoder) error

Decode decodes Attributes from json.

func (Attributes) Encode

func (s Attributes) Encode(e *jx.Encoder)

Encode encodes Attributes as json.

func (Attributes) MarshalJSON

func (s Attributes) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Attributes) SetFake

func (s *Attributes) SetFake()

SetFake set fake values.

func (*Attributes) UnmarshalJSON

func (s *Attributes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Attributes) Validate

func (s Attributes) Validate() error

type BoolValue

type BoolValue struct {
	BoolValue bool `json:"boolValue"`
}

Ref: #/components/schemas/BoolValue

func (*BoolValue) Decode

func (s *BoolValue) Decode(d *jx.Decoder) error

Decode decodes BoolValue from json.

func (*BoolValue) Encode

func (s *BoolValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BoolValue) GetBoolValue

func (s *BoolValue) GetBoolValue() bool

GetBoolValue returns the value of BoolValue.

func (*BoolValue) MarshalJSON

func (s *BoolValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BoolValue) SetBoolValue

func (s *BoolValue) SetBoolValue(val bool)

SetBoolValue sets the value of BoolValue.

func (*BoolValue) SetFake

func (s *BoolValue) SetFake()

SetFake set fake values.

func (*BoolValue) UnmarshalJSON

func (s *BoolValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BytesValue

type BytesValue struct {
	BytesValue []byte `json:"bytesValue"`
}

Ref: #/components/schemas/BytesValue

func (*BytesValue) Decode

func (s *BytesValue) Decode(d *jx.Decoder) error

Decode decodes BytesValue from json.

func (*BytesValue) Encode

func (s *BytesValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BytesValue) GetBytesValue

func (s *BytesValue) GetBytesValue() []byte

GetBytesValue returns the value of BytesValue.

func (*BytesValue) MarshalJSON

func (s *BytesValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BytesValue) SetBytesValue

func (s *BytesValue) SetBytesValue(val []byte)

SetBytesValue sets the value of BytesValue.

func (*BytesValue) SetFake

func (s *BytesValue) SetFake()

SetFake set fake values.

func (*BytesValue) UnmarshalJSON

func (s *BytesValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) Echo

func (c *Client) Echo(ctx context.Context) (EchoOK, error)

Echo invokes echo operation.

Echo request for testing, issued by Grafana.

GET /api/echo

func (*Client) Search

func (c *Client) Search(ctx context.Context, params SearchParams) (*Traces, error)

Search invokes search operation.

Execute TraceQL query.

GET /api/search

func (*Client) SearchTagValues

func (c *Client) SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)

SearchTagValues invokes searchTagValues operation.

This endpoint retrieves all discovered values for the given tag, which can be used in search.

GET /api/search/tag/{tag_name}/values

func (*Client) SearchTagValuesV2

func (c *Client) SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)

SearchTagValuesV2 invokes searchTagValuesV2 operation.

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.

GET /api/v2/search/tag/{attribute_selector}/values

func (*Client) SearchTags

func (c *Client) SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)

SearchTags invokes searchTags operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/search/tags

func (*Client) SearchTagsV2 added in v0.12.0

func (c *Client) SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)

SearchTagsV2 invokes searchTagsV2 operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/v2/search/tags

func (*Client) TraceByID

func (c *Client) TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)

TraceByID invokes traceByID operation.

Querying traces by id.

GET /api/traces/{traceID}

type ClientOption

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

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type DoubleValue

type DoubleValue struct {
	DoubleValue float64 `json:"doubleValue"`
}

Ref: #/components/schemas/DoubleValue

func (*DoubleValue) Decode

func (s *DoubleValue) Decode(d *jx.Decoder) error

Decode decodes DoubleValue from json.

func (*DoubleValue) Encode

func (s *DoubleValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*DoubleValue) GetDoubleValue

func (s *DoubleValue) GetDoubleValue() float64

GetDoubleValue returns the value of DoubleValue.

func (*DoubleValue) MarshalJSON

func (s *DoubleValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DoubleValue) SetDoubleValue

func (s *DoubleValue) SetDoubleValue(val float64)

SetDoubleValue sets the value of DoubleValue.

func (*DoubleValue) SetFake

func (s *DoubleValue) SetFake()

SetFake set fake values.

func (*DoubleValue) UnmarshalJSON

func (s *DoubleValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DoubleValue) Validate

func (s *DoubleValue) Validate() error

type EchoOK

type EchoOK struct {
	Data io.Reader
}

func (EchoOK) Read

func (s EchoOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type Error

type Error string

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (Error) Encode

func (s Error) Encode(e *jx.Encoder)

Encode encodes Error as json.

func (Error) MarshalJSON

func (s Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetFake

func (s *Error) SetFake()

SetFake set fake values.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

ErrorStatusCode wraps Error with StatusCode.

func (*ErrorStatusCode) Error

func (s *ErrorStatusCode) Error() string

func (*ErrorStatusCode) GetResponse

func (s *ErrorStatusCode) GetResponse() Error

GetResponse returns the value of Response.

func (*ErrorStatusCode) GetStatusCode

func (s *ErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*ErrorStatusCode) SetResponse

func (s *ErrorStatusCode) SetResponse(val Error)

SetResponse sets the value of Response.

func (*ErrorStatusCode) SetStatusCode

func (s *ErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type Handler

type Handler interface {
	// Echo implements echo operation.
	//
	// Echo request for testing, issued by Grafana.
	//
	// GET /api/echo
	Echo(ctx context.Context) (EchoOK, error)
	// Search implements search operation.
	//
	// Execute TraceQL query.
	//
	// GET /api/search
	Search(ctx context.Context, params SearchParams) (*Traces, error)
	// SearchTagValues implements searchTagValues operation.
	//
	// This endpoint retrieves all discovered values for the given tag, which can be used in search.
	//
	// GET /api/search/tag/{tag_name}/values
	SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)
	// SearchTagValuesV2 implements searchTagValuesV2 operation.
	//
	// This endpoint retrieves all discovered values and their data types for the given TraceQL
	// identifier.
	//
	// GET /api/v2/search/tag/{attribute_selector}/values
	SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)
	// SearchTags implements searchTags operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/search/tags
	SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)
	// SearchTagsV2 implements searchTagsV2 operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/v2/search/tags
	SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)
	// TraceByID implements traceByID operation.
	//
	// Querying traces by id.
	//
	// GET /api/traces/{traceID}
	TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)
	// NewError creates *ErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *ErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type IntValue

type IntValue struct {
	IntValue int64 `json:"intValue"`
}

Ref: #/components/schemas/IntValue

func (*IntValue) Decode

func (s *IntValue) Decode(d *jx.Decoder) error

Decode decodes IntValue from json.

func (*IntValue) Encode

func (s *IntValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*IntValue) GetIntValue

func (s *IntValue) GetIntValue() int64

GetIntValue returns the value of IntValue.

func (*IntValue) MarshalJSON

func (s *IntValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*IntValue) SetFake

func (s *IntValue) SetFake()

SetFake set fake values.

func (*IntValue) SetIntValue

func (s *IntValue) SetIntValue(val int64)

SetIntValue sets the value of IntValue.

func (*IntValue) UnmarshalJSON

func (s *IntValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Invoker added in v0.1.0

type Invoker interface {
	// Echo invokes echo operation.
	//
	// Echo request for testing, issued by Grafana.
	//
	// GET /api/echo
	Echo(ctx context.Context) (EchoOK, error)
	// Search invokes search operation.
	//
	// Execute TraceQL query.
	//
	// GET /api/search
	Search(ctx context.Context, params SearchParams) (*Traces, error)
	// SearchTagValues invokes searchTagValues operation.
	//
	// This endpoint retrieves all discovered values for the given tag, which can be used in search.
	//
	// GET /api/search/tag/{tag_name}/values
	SearchTagValues(ctx context.Context, params SearchTagValuesParams) (*TagValues, error)
	// SearchTagValuesV2 invokes searchTagValuesV2 operation.
	//
	// This endpoint retrieves all discovered values and their data types for the given TraceQL
	// identifier.
	//
	// GET /api/v2/search/tag/{attribute_selector}/values
	SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (*TagValuesV2, error)
	// SearchTags invokes searchTags operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/search/tags
	SearchTags(ctx context.Context, params SearchTagsParams) (*TagNames, error)
	// SearchTagsV2 invokes searchTagsV2 operation.
	//
	// This endpoint retrieves all discovered tag names that can be used in search.
	//
	// GET /api/v2/search/tags
	SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (*TagNamesV2, error)
	// TraceByID invokes traceByID operation.
	//
	// Querying traces by id.
	//
	// GET /api/traces/{traceID}
	TraceByID(ctx context.Context, params TraceByIDParams) (TraceByIDRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type KeyValue

type KeyValue struct {
	Key   string   `json:"key"`
	Value AnyValue `json:"value"`
}

Ref: #/components/schemas/KeyValue

func (*KeyValue) Decode

func (s *KeyValue) Decode(d *jx.Decoder) error

Decode decodes KeyValue from json.

func (*KeyValue) Encode

func (s *KeyValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KeyValue) GetKey

func (s *KeyValue) GetKey() string

GetKey returns the value of Key.

func (*KeyValue) GetValue

func (s *KeyValue) GetValue() AnyValue

GetValue returns the value of Value.

func (*KeyValue) MarshalJSON

func (s *KeyValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KeyValue) SetFake

func (s *KeyValue) SetFake()

SetFake set fake values.

func (*KeyValue) SetKey

func (s *KeyValue) SetKey(val string)

SetKey sets the value of Key.

func (*KeyValue) SetValue

func (s *KeyValue) SetValue(val AnyValue)

SetValue sets the value of Value.

func (*KeyValue) UnmarshalJSON

func (s *KeyValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*KeyValue) Validate

func (s *KeyValue) Validate() error

type KvlistValue

type KvlistValue struct {
	KvlistValue []KeyValue `json:"kvlistValue"`
}

Ref: #/components/schemas/KvlistValue

func (*KvlistValue) Decode

func (s *KvlistValue) Decode(d *jx.Decoder) error

Decode decodes KvlistValue from json.

func (*KvlistValue) Encode

func (s *KvlistValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*KvlistValue) GetKvlistValue

func (s *KvlistValue) GetKvlistValue() []KeyValue

GetKvlistValue returns the value of KvlistValue.

func (*KvlistValue) MarshalJSON

func (s *KvlistValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*KvlistValue) SetFake

func (s *KvlistValue) SetFake()

SetFake set fake values.

func (*KvlistValue) SetKvlistValue

func (s *KvlistValue) SetKvlistValue(val []KeyValue)

SetKvlistValue sets the value of KvlistValue.

func (*KvlistValue) UnmarshalJSON

func (s *KvlistValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*KvlistValue) Validate

func (s *KvlistValue) Validate() error

type Labeler added in v0.10.0

type Labeler struct {
	// contains filtered or unexported fields
}

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext added in v0.10.0

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add added in v0.10.0

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet added in v0.10.0

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptDuration

type OptDuration struct {
	Value time.Duration
	Set   bool
}

OptDuration is optional time.Duration.

func NewOptDuration

func NewOptDuration(v time.Duration) OptDuration

NewOptDuration returns new OptDuration with value set to v.

func (OptDuration) Get

func (o OptDuration) Get() (v time.Duration, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptDuration) IsSet

func (o OptDuration) IsSet() bool

IsSet returns true if OptDuration was set.

func (OptDuration) Or

Or returns value if set, or given parameter if does not.

func (*OptDuration) Reset

func (o *OptDuration) Reset()

Reset unsets value.

func (*OptDuration) SetTo

func (o *OptDuration) SetTo(v time.Duration)

SetTo sets value to v.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetFake

func (s *OptInt) SetFake()

SetFake set fake values.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetFake

func (s *OptString) SetFake()

SetFake set fake values.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptTagScope added in v0.12.0

type OptTagScope struct {
	Value TagScope
	Set   bool
}

OptTagScope is optional TagScope.

func NewOptTagScope added in v0.12.0

func NewOptTagScope(v TagScope) OptTagScope

NewOptTagScope returns new OptTagScope with value set to v.

func (OptTagScope) Get added in v0.12.0

func (o OptTagScope) Get() (v TagScope, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptTagScope) IsSet added in v0.12.0

func (o OptTagScope) IsSet() bool

IsSet returns true if OptTagScope was set.

func (OptTagScope) Or added in v0.12.0

func (o OptTagScope) Or(d TagScope) TagScope

Or returns value if set, or given parameter if does not.

func (*OptTagScope) Reset added in v0.12.0

func (o *OptTagScope) Reset()

Reset unsets value.

func (*OptTagScope) SetTo added in v0.12.0

func (o *OptTagScope) SetTo(v TagScope)

SetTo sets value to v.

type OptTempoSpanSet

type OptTempoSpanSet struct {
	Value TempoSpanSet
	Set   bool
}

OptTempoSpanSet is optional TempoSpanSet.

func NewOptTempoSpanSet

func NewOptTempoSpanSet(v TempoSpanSet) OptTempoSpanSet

NewOptTempoSpanSet returns new OptTempoSpanSet with value set to v.

func (*OptTempoSpanSet) Decode

func (o *OptTempoSpanSet) Decode(d *jx.Decoder) error

Decode decodes TempoSpanSet from json.

func (OptTempoSpanSet) Encode

func (o OptTempoSpanSet) Encode(e *jx.Encoder)

Encode encodes TempoSpanSet as json.

func (OptTempoSpanSet) Get

func (o OptTempoSpanSet) Get() (v TempoSpanSet, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptTempoSpanSet) IsSet

func (o OptTempoSpanSet) IsSet() bool

IsSet returns true if OptTempoSpanSet was set.

func (OptTempoSpanSet) MarshalJSON

func (s OptTempoSpanSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptTempoSpanSet) Or

Or returns value if set, or given parameter if does not.

func (*OptTempoSpanSet) Reset

func (o *OptTempoSpanSet) Reset()

Reset unsets value.

func (*OptTempoSpanSet) SetFake

func (s *OptTempoSpanSet) SetFake()

SetFake set fake values.

func (*OptTempoSpanSet) SetTo

func (o *OptTempoSpanSet) SetTo(v TempoSpanSet)

SetTo sets value to v.

func (*OptTempoSpanSet) UnmarshalJSON

func (s *OptTempoSpanSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptUnixSeconds

type OptUnixSeconds struct {
	Value time.Time
	Set   bool
}

OptUnixSeconds is optional time.Time.

func NewOptUnixSeconds

func NewOptUnixSeconds(v time.Time) OptUnixSeconds

NewOptUnixSeconds returns new OptUnixSeconds with value set to v.

func (OptUnixSeconds) Get

func (o OptUnixSeconds) Get() (v time.Time, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptUnixSeconds) IsSet

func (o OptUnixSeconds) IsSet() bool

IsSet returns true if OptUnixSeconds was set.

func (OptUnixSeconds) Or

func (o OptUnixSeconds) Or(d time.Time) time.Time

Or returns value if set, or given parameter if does not.

func (*OptUnixSeconds) Reset

func (o *OptUnixSeconds) Reset()

Reset unsets value.

func (*OptUnixSeconds) SetTo

func (o *OptUnixSeconds) SetTo(v time.Time)

SetTo sets value to v.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type Route

type Route struct {
	// contains filtered or unexported fields
}

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary added in v0.1.0

func (r Route) Summary() string

Summary returns OpenAPI summary.

type ScopeTags added in v0.12.0

type ScopeTags struct {
	Name TagScope `json:"name"`
	Tags []string `json:"tags"`
}

Ref: #/components/schemas/ScopeTags

func (*ScopeTags) Decode added in v0.12.0

func (s *ScopeTags) Decode(d *jx.Decoder) error

Decode decodes ScopeTags from json.

func (*ScopeTags) Encode added in v0.12.0

func (s *ScopeTags) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ScopeTags) GetName added in v0.12.0

func (s *ScopeTags) GetName() TagScope

GetName returns the value of Name.

func (*ScopeTags) GetTags added in v0.12.0

func (s *ScopeTags) GetTags() []string

GetTags returns the value of Tags.

func (*ScopeTags) MarshalJSON added in v0.12.0

func (s *ScopeTags) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ScopeTags) SetFake added in v0.12.0

func (s *ScopeTags) SetFake()

SetFake set fake values.

func (*ScopeTags) SetName added in v0.12.0

func (s *ScopeTags) SetName(val TagScope)

SetName sets the value of Name.

func (*ScopeTags) SetTags added in v0.12.0

func (s *ScopeTags) SetTags(val []string)

SetTags sets the value of Tags.

func (*ScopeTags) UnmarshalJSON added in v0.12.0

func (s *ScopeTags) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ScopeTags) Validate added in v0.12.0

func (s *ScopeTags) Validate() error

type SearchParams

type SearchParams struct {
	// URL-encoded TraceQL query.
	Q OptString
	// Logfmt encoding of any span-level or process-level attributes to filter on.
	// The value is matched as a case-insensitive substring.
	// Key-value pairs are separated by spaces.
	// If a value contains a space, it should be enclosed within double quotes.
	Tags OptString
	// Find traces with at least this duration. Duration values are of the form 10s for 10 seconds, 100ms,
	//  30m, etc.
	MinDuration OptDuration
	// Find traces with no greater than this duration. Uses the same form as `minDuration`.
	MaxDuration OptDuration
	// Limit the number of search results. Default is 20, but this is configurable in the querier. Refer
	// to Configuration.
	Limit OptInt
	// Along with `end` define a time range from which traces should be returned.
	Start OptUnixSeconds
	// Along with `start`, define a time range from which traces should be returned.
	// Providing both `start` and `end` will change the way that Tempo searches.
	// If the parameters are not provided, then Tempo will search the recent trace data stored in the
	// ingesters.
	// If the parameters are provided, it will search the backend as well.
	End OptUnixSeconds
	// Limit the number of spans per span-set. Default value is 3.
	Spss OptInt
}

SearchParams is parameters of search operation.

type SearchTagValuesParams

type SearchTagValuesParams struct {
	// Tag name.
	TagName string
	// If provided, the tag values returned by the API are filtered to only return values seen on spans
	// matching your filter parameters.
	// Queries can be incomplete: for example, `{ .cluster = }`. Tempo extracts only the valid matchers
	// and build a valid query.
	// Only queries with a single selector `{}“ and AND `&&` operators are supported.
	// - Example supported: `{ .cluster = "us-east-1" && .service = "frontend" }`
	// - Example unsupported: `{ .cluster = "us-east-1" || .service = "frontend" } && { .cluster =
	// "us-east-2" }`.
	Q OptString
	// Along with `end` define a time range from which tags should be returned.
	Start OptUnixSeconds
	// Along with `start` define a time range from which tags should be returned.
	// Providing both `start` and `end` includes blocks for the specified time range only.
	End OptUnixSeconds
}

SearchTagValuesParams is parameters of searchTagValues operation.

type SearchTagValuesV2Params

type SearchTagValuesV2Params struct {
	// TraceQL attribute selector (`.service.name`, `resource.service.name`, etc.).
	AttributeSelector string
	// If provided, the tag values returned by the API are filtered to only return values seen on spans
	// matching your filter parameters.
	// Queries can be incomplete: for example, `{ .cluster = }`. Tempo extracts only the valid matchers
	// and build a valid query.
	// Only queries with a single selector `{}“ and AND `&&` operators are supported.
	// - Example supported: `{ .cluster = "us-east-1" && .service = "frontend" }`
	// - Example unsupported: `{ .cluster = "us-east-1" || .service = "frontend" } && { .cluster =
	// "us-east-2" }`.
	Q OptString
	// Along with `end` define a time range from which tags should be returned.
	Start OptUnixSeconds
	// Along with `start` define a time range from which tags should be returned.
	// Providing both `start` and `end` includes blocks for the specified time range only.
	End OptUnixSeconds
}

SearchTagValuesV2Params is parameters of searchTagValuesV2 operation.

type SearchTagsParams added in v0.12.0

type SearchTagsParams struct {
	// Specifies the scope of the tags, this is an optional parameter, if not specified it means all
	// scopes.
	Scope OptTagScope
	// Along with `end` define a time range from which tags should be returned.
	Start OptUnixSeconds
	// Along with `start` define a time range from which tags should be returned.
	// Providing both `start` and `end` includes blocks for the specified time range only.
	End OptUnixSeconds
}

SearchTagsParams is parameters of searchTags operation.

type SearchTagsV2Params added in v0.12.0

type SearchTagsV2Params struct {
	// Specifies the scope of the tags, this is an optional parameter, if not specified it means all
	// scopes.
	Scope OptTagScope
	// Along with `end` define a time range from which tags should be returned.
	Start OptUnixSeconds
	// Along with `start` define a time range from which tags should be returned.
	// Providing both `start` and `end` includes blocks for the specified time range only.
	End OptUnixSeconds
}

SearchTagsV2Params is parameters of searchTagsV2 operation.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

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

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type StringValue

type StringValue struct {
	StringValue string `json:"stringValue"`
}

Ref: #/components/schemas/StringValue

func (*StringValue) Decode

func (s *StringValue) Decode(d *jx.Decoder) error

Decode decodes StringValue from json.

func (*StringValue) Encode

func (s *StringValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StringValue) GetStringValue

func (s *StringValue) GetStringValue() string

GetStringValue returns the value of StringValue.

func (*StringValue) MarshalJSON

func (s *StringValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StringValue) SetFake

func (s *StringValue) SetFake()

SetFake set fake values.

func (*StringValue) SetStringValue

func (s *StringValue) SetStringValue(val string)

SetStringValue sets the value of StringValue.

func (*StringValue) UnmarshalJSON

func (s *StringValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagNames

type TagNames struct {
	TagNames []string `json:"tagNames"`
}

Ref: #/components/schemas/TagNames

func (*TagNames) Decode

func (s *TagNames) Decode(d *jx.Decoder) error

Decode decodes TagNames from json.

func (*TagNames) Encode

func (s *TagNames) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagNames) GetTagNames

func (s *TagNames) GetTagNames() []string

GetTagNames returns the value of TagNames.

func (*TagNames) MarshalJSON

func (s *TagNames) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagNames) SetFake

func (s *TagNames) SetFake()

SetFake set fake values.

func (*TagNames) SetTagNames

func (s *TagNames) SetTagNames(val []string)

SetTagNames sets the value of TagNames.

func (*TagNames) UnmarshalJSON

func (s *TagNames) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagNamesV2 added in v0.12.0

type TagNamesV2 struct {
	Scopes []ScopeTags `json:"scopes"`
}

Ref: #/components/schemas/TagNamesV2

func (*TagNamesV2) Decode added in v0.12.0

func (s *TagNamesV2) Decode(d *jx.Decoder) error

Decode decodes TagNamesV2 from json.

func (*TagNamesV2) Encode added in v0.12.0

func (s *TagNamesV2) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagNamesV2) GetScopes added in v0.12.0

func (s *TagNamesV2) GetScopes() []ScopeTags

GetScopes returns the value of Scopes.

func (*TagNamesV2) MarshalJSON added in v0.12.0

func (s *TagNamesV2) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagNamesV2) SetFake added in v0.12.0

func (s *TagNamesV2) SetFake()

SetFake set fake values.

func (*TagNamesV2) SetScopes added in v0.12.0

func (s *TagNamesV2) SetScopes(val []ScopeTags)

SetScopes sets the value of Scopes.

func (*TagNamesV2) UnmarshalJSON added in v0.12.0

func (s *TagNamesV2) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TagNamesV2) Validate added in v0.12.0

func (s *TagNamesV2) Validate() error

type TagScope added in v0.12.0

type TagScope string

Ref: #/components/schemas/TagScope

const (
	TagScopeSpan      TagScope = "span"
	TagScopeResource  TagScope = "resource"
	TagScopeIntrinsic TagScope = "intrinsic"
	TagScopeNone      TagScope = "none"
)

func (TagScope) AllValues added in v0.12.0

func (TagScope) AllValues() []TagScope

AllValues returns all TagScope values.

func (*TagScope) Decode added in v0.12.0

func (s *TagScope) Decode(d *jx.Decoder) error

Decode decodes TagScope from json.

func (TagScope) Encode added in v0.12.0

func (s TagScope) Encode(e *jx.Encoder)

Encode encodes TagScope as json.

func (TagScope) MarshalJSON added in v0.12.0

func (s TagScope) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (TagScope) MarshalText added in v0.12.0

func (s TagScope) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*TagScope) SetFake added in v0.12.0

func (s *TagScope) SetFake()

SetFake set fake values.

func (*TagScope) UnmarshalJSON added in v0.12.0

func (s *TagScope) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TagScope) UnmarshalText added in v0.12.0

func (s *TagScope) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (TagScope) Validate added in v0.12.0

func (s TagScope) Validate() error

type TagValue

type TagValue struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

Ref: #/components/schemas/TagValue

func (*TagValue) Decode

func (s *TagValue) Decode(d *jx.Decoder) error

Decode decodes TagValue from json.

func (*TagValue) Encode

func (s *TagValue) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValue) GetType

func (s *TagValue) GetType() string

GetType returns the value of Type.

func (*TagValue) GetValue

func (s *TagValue) GetValue() string

GetValue returns the value of Value.

func (*TagValue) MarshalJSON

func (s *TagValue) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValue) SetFake

func (s *TagValue) SetFake()

SetFake set fake values.

func (*TagValue) SetType

func (s *TagValue) SetType(val string)

SetType sets the value of Type.

func (*TagValue) SetValue

func (s *TagValue) SetValue(val string)

SetValue sets the value of Value.

func (*TagValue) UnmarshalJSON

func (s *TagValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagValues

type TagValues struct {
	TagValues []string `json:"tagValues"`
}

Ref: #/components/schemas/TagValues

func (*TagValues) Decode

func (s *TagValues) Decode(d *jx.Decoder) error

Decode decodes TagValues from json.

func (*TagValues) Encode

func (s *TagValues) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValues) GetTagValues

func (s *TagValues) GetTagValues() []string

GetTagValues returns the value of TagValues.

func (*TagValues) MarshalJSON

func (s *TagValues) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValues) SetFake

func (s *TagValues) SetFake()

SetFake set fake values.

func (*TagValues) SetTagValues

func (s *TagValues) SetTagValues(val []string)

SetTagValues sets the value of TagValues.

func (*TagValues) UnmarshalJSON

func (s *TagValues) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TagValuesV2

type TagValuesV2 struct {
	TagValues []TagValue `json:"tagValues"`
}

Ref: #/components/schemas/TagValuesV2

func (*TagValuesV2) Decode

func (s *TagValuesV2) Decode(d *jx.Decoder) error

Decode decodes TagValuesV2 from json.

func (*TagValuesV2) Encode

func (s *TagValuesV2) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TagValuesV2) GetTagValues

func (s *TagValuesV2) GetTagValues() []TagValue

GetTagValues returns the value of TagValues.

func (*TagValuesV2) MarshalJSON

func (s *TagValuesV2) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TagValuesV2) SetFake

func (s *TagValuesV2) SetFake()

SetFake set fake values.

func (*TagValuesV2) SetTagValues

func (s *TagValuesV2) SetTagValues(val []TagValue)

SetTagValues sets the value of TagValues.

func (*TagValuesV2) UnmarshalJSON

func (s *TagValuesV2) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type TempoSpan

type TempoSpan struct {
	SpanID            string     `json:"spanID"`
	Name              OptString  `json:"name"`
	StartTimeUnixNano time.Time  `json:"startTimeUnixNano"`
	DurationNanos     int64      `json:"durationNanos"`
	Attributes        Attributes `json:"attributes"`
}

Ref: #/components/schemas/TempoSpan

func (*TempoSpan) Decode

func (s *TempoSpan) Decode(d *jx.Decoder) error

Decode decodes TempoSpan from json.

func (*TempoSpan) Encode

func (s *TempoSpan) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TempoSpan) GetAttributes

func (s *TempoSpan) GetAttributes() Attributes

GetAttributes returns the value of Attributes.

func (*TempoSpan) GetDurationNanos

func (s *TempoSpan) GetDurationNanos() int64

GetDurationNanos returns the value of DurationNanos.

func (*TempoSpan) GetName

func (s *TempoSpan) GetName() OptString

GetName returns the value of Name.

func (*TempoSpan) GetSpanID

func (s *TempoSpan) GetSpanID() string

GetSpanID returns the value of SpanID.

func (*TempoSpan) GetStartTimeUnixNano

func (s *TempoSpan) GetStartTimeUnixNano() time.Time

GetStartTimeUnixNano returns the value of StartTimeUnixNano.

func (*TempoSpan) MarshalJSON

func (s *TempoSpan) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TempoSpan) SetAttributes

func (s *TempoSpan) SetAttributes(val Attributes)

SetAttributes sets the value of Attributes.

func (*TempoSpan) SetDurationNanos

func (s *TempoSpan) SetDurationNanos(val int64)

SetDurationNanos sets the value of DurationNanos.

func (*TempoSpan) SetFake

func (s *TempoSpan) SetFake()

SetFake set fake values.

func (*TempoSpan) SetName

func (s *TempoSpan) SetName(val OptString)

SetName sets the value of Name.

func (*TempoSpan) SetSpanID

func (s *TempoSpan) SetSpanID(val string)

SetSpanID sets the value of SpanID.

func (*TempoSpan) SetStartTimeUnixNano

func (s *TempoSpan) SetStartTimeUnixNano(val time.Time)

SetStartTimeUnixNano sets the value of StartTimeUnixNano.

func (*TempoSpan) UnmarshalJSON

func (s *TempoSpan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TempoSpan) Validate

func (s *TempoSpan) Validate() error

type TempoSpanSet

type TempoSpanSet struct {
	Spans      []TempoSpan `json:"spans"`
	Matched    OptInt      `json:"matched"`
	Attributes Attributes  `json:"attributes"`
}

Ref: #/components/schemas/TempoSpanSet

func (*TempoSpanSet) Decode

func (s *TempoSpanSet) Decode(d *jx.Decoder) error

Decode decodes TempoSpanSet from json.

func (*TempoSpanSet) Encode

func (s *TempoSpanSet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TempoSpanSet) GetAttributes

func (s *TempoSpanSet) GetAttributes() Attributes

GetAttributes returns the value of Attributes.

func (*TempoSpanSet) GetMatched

func (s *TempoSpanSet) GetMatched() OptInt

GetMatched returns the value of Matched.

func (*TempoSpanSet) GetSpans

func (s *TempoSpanSet) GetSpans() []TempoSpan

GetSpans returns the value of Spans.

func (*TempoSpanSet) MarshalJSON

func (s *TempoSpanSet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TempoSpanSet) SetAttributes

func (s *TempoSpanSet) SetAttributes(val Attributes)

SetAttributes sets the value of Attributes.

func (*TempoSpanSet) SetFake

func (s *TempoSpanSet) SetFake()

SetFake set fake values.

func (*TempoSpanSet) SetMatched

func (s *TempoSpanSet) SetMatched(val OptInt)

SetMatched sets the value of Matched.

func (*TempoSpanSet) SetSpans

func (s *TempoSpanSet) SetSpans(val []TempoSpan)

SetSpans sets the value of Spans.

func (*TempoSpanSet) UnmarshalJSON

func (s *TempoSpanSet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TempoSpanSet) Validate

func (s *TempoSpanSet) Validate() error

type TraceByID

type TraceByID struct {
	Data io.Reader
}

func (TraceByID) Read

func (s TraceByID) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type TraceByIDNotFound

type TraceByIDNotFound struct{}

Ref: #/components/responses/TraceByIDNotFound

type TraceByIDParams

type TraceByIDParams struct {
	// TraceID to query.
	TraceID string
	// Along with `end` define a time range from which traces should be returned.
	Start OptUnixSeconds
	// Along with `start` define a time range from which traces should be returned.
	// Providing both `start` and `end` will include traces for the specified time range only.
	// If the parameters are not provided then Tempo will check for the trace across all blocks in
	// backend.
	// If the parameters are provided, it will only check in the blocks within the specified time range,
	// this can result in trace not being found or partial results if it does not fall in the specified
	// time range.
	End OptUnixSeconds
}

TraceByIDParams is parameters of traceByID operation.

type TraceByIDRes

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

type TraceSearchMetadata

type TraceSearchMetadata struct {
	TraceID           string          `json:"traceID"`
	RootServiceName   OptString       `json:"rootServiceName"`
	RootTraceName     OptString       `json:"rootTraceName"`
	StartTimeUnixNano time.Time       `json:"startTimeUnixNano"`
	DurationMs        OptInt          `json:"durationMs"`
	SpanSet           OptTempoSpanSet `json:"spanSet"`
}

Ref: #/components/schemas/TraceSearchMetadata

func (*TraceSearchMetadata) Decode

func (s *TraceSearchMetadata) Decode(d *jx.Decoder) error

Decode decodes TraceSearchMetadata from json.

func (*TraceSearchMetadata) Encode

func (s *TraceSearchMetadata) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*TraceSearchMetadata) GetDurationMs

func (s *TraceSearchMetadata) GetDurationMs() OptInt

GetDurationMs returns the value of DurationMs.

func (*TraceSearchMetadata) GetRootServiceName

func (s *TraceSearchMetadata) GetRootServiceName() OptString

GetRootServiceName returns the value of RootServiceName.

func (*TraceSearchMetadata) GetRootTraceName

func (s *TraceSearchMetadata) GetRootTraceName() OptString

GetRootTraceName returns the value of RootTraceName.

func (*TraceSearchMetadata) GetSpanSet

func (s *TraceSearchMetadata) GetSpanSet() OptTempoSpanSet

GetSpanSet returns the value of SpanSet.

func (*TraceSearchMetadata) GetStartTimeUnixNano

func (s *TraceSearchMetadata) GetStartTimeUnixNano() time.Time

GetStartTimeUnixNano returns the value of StartTimeUnixNano.

func (*TraceSearchMetadata) GetTraceID

func (s *TraceSearchMetadata) GetTraceID() string

GetTraceID returns the value of TraceID.

func (*TraceSearchMetadata) MarshalJSON

func (s *TraceSearchMetadata) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*TraceSearchMetadata) SetDurationMs

func (s *TraceSearchMetadata) SetDurationMs(val OptInt)

SetDurationMs sets the value of DurationMs.

func (*TraceSearchMetadata) SetFake

func (s *TraceSearchMetadata) SetFake()

SetFake set fake values.

func (*TraceSearchMetadata) SetRootServiceName

func (s *TraceSearchMetadata) SetRootServiceName(val OptString)

SetRootServiceName sets the value of RootServiceName.

func (*TraceSearchMetadata) SetRootTraceName

func (s *TraceSearchMetadata) SetRootTraceName(val OptString)

SetRootTraceName sets the value of RootTraceName.

func (*TraceSearchMetadata) SetSpanSet

func (s *TraceSearchMetadata) SetSpanSet(val OptTempoSpanSet)

SetSpanSet sets the value of SpanSet.

func (*TraceSearchMetadata) SetStartTimeUnixNano

func (s *TraceSearchMetadata) SetStartTimeUnixNano(val time.Time)

SetStartTimeUnixNano sets the value of StartTimeUnixNano.

func (*TraceSearchMetadata) SetTraceID

func (s *TraceSearchMetadata) SetTraceID(val string)

SetTraceID sets the value of TraceID.

func (*TraceSearchMetadata) UnmarshalJSON

func (s *TraceSearchMetadata) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TraceSearchMetadata) Validate

func (s *TraceSearchMetadata) Validate() error

type Traces

type Traces struct {
	Traces []TraceSearchMetadata `json:"traces"`
}

Ref: #/components/schemas/Traces

func (*Traces) Decode

func (s *Traces) Decode(d *jx.Decoder) error

Decode decodes Traces from json.

func (*Traces) Encode

func (s *Traces) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Traces) GetTraces

func (s *Traces) GetTraces() []TraceSearchMetadata

GetTraces returns the value of Traces.

func (*Traces) MarshalJSON

func (s *Traces) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Traces) SetFake

func (s *Traces) SetFake()

SetFake set fake values.

func (*Traces) SetTraces

func (s *Traces) SetTraces(val []TraceSearchMetadata)

SetTraces sets the value of Traces.

func (*Traces) UnmarshalJSON

func (s *Traces) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Traces) Validate

func (s *Traces) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) Echo

func (UnimplementedHandler) Echo(ctx context.Context) (r EchoOK, _ error)

Echo implements echo operation.

Echo request for testing, issued by Grafana.

GET /api/echo

func (UnimplementedHandler) NewError

func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) Search

func (UnimplementedHandler) Search(ctx context.Context, params SearchParams) (r *Traces, _ error)

Search implements search operation.

Execute TraceQL query.

GET /api/search

func (UnimplementedHandler) SearchTagValues

func (UnimplementedHandler) SearchTagValues(ctx context.Context, params SearchTagValuesParams) (r *TagValues, _ error)

SearchTagValues implements searchTagValues operation.

This endpoint retrieves all discovered values for the given tag, which can be used in search.

GET /api/search/tag/{tag_name}/values

func (UnimplementedHandler) SearchTagValuesV2

func (UnimplementedHandler) SearchTagValuesV2(ctx context.Context, params SearchTagValuesV2Params) (r *TagValuesV2, _ error)

SearchTagValuesV2 implements searchTagValuesV2 operation.

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.

GET /api/v2/search/tag/{attribute_selector}/values

func (UnimplementedHandler) SearchTags

func (UnimplementedHandler) SearchTags(ctx context.Context, params SearchTagsParams) (r *TagNames, _ error)

SearchTags implements searchTags operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/search/tags

func (UnimplementedHandler) SearchTagsV2 added in v0.12.0

func (UnimplementedHandler) SearchTagsV2(ctx context.Context, params SearchTagsV2Params) (r *TagNamesV2, _ error)

SearchTagsV2 implements searchTagsV2 operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/v2/search/tags

func (UnimplementedHandler) TraceByID

func (UnimplementedHandler) TraceByID(ctx context.Context, params TraceByIDParams) (r TraceByIDRes, _ error)

TraceByID implements traceByID operation.

Querying traces by id.

GET /api/traces/{traceID}

Jump to

Keyboard shortcuts

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