writecapnp

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BucketSpan_TypeID = 0x983649d193295eae

BucketSpan_TypeID is the unique identifier for the type BucketSpan.

View Source
const Exemplar_TypeID = 0xbd820120399954be

Exemplar_TypeID is the unique identifier for the type Exemplar.

View Source
const Histogram_ResetHint_TypeID = 0xd5b0cec646441eb0

Histogram_ResetHint_TypeID is the unique identifier for the type Histogram_ResetHint.

View Source
const Histogram_TypeID = 0xc4dd3c458256382a

Histogram_TypeID is the unique identifier for the type Histogram.

View Source
const Label_TypeID = 0xf192c7ee07114b32

Label_TypeID is the unique identifier for the type Label.

View Source
const Sample_TypeID = 0xef49df6cfa8875de

Sample_TypeID is the unique identifier for the type Sample.

View Source
const Symbols_TypeID = 0xab79e1a6ecfeb87a

Symbols_TypeID is the unique identifier for the type Symbols.

View Source
const TimeSeries_TypeID = 0xb438c10228b97446

TimeSeries_TypeID is the unique identifier for the type TimeSeries.

View Source
const WriteError_TypeID = 0xe67be4164a39ea55

WriteError_TypeID is the unique identifier for the type WriteError.

View Source
const WriteRequest_TypeID = 0xeb3bcb770c8eb6be

WriteRequest_TypeID is the unique identifier for the type WriteRequest.

View Source
const Writer_TypeID = 0xcc20b9c332c83b91

Writer_TypeID is the unique identifier for the type Writer.

View Source
const Writer_write_Params_TypeID = 0x90d5073324ecc34b

Writer_write_Params_TypeID is the unique identifier for the type Writer_write_Params.

View Source
const Writer_write_Results_TypeID = 0x87f6d2196d414cf4

Writer_write_Results_TypeID is the unique identifier for the type Writer_write_Results.

Variables

This section is empty.

Functions

func BuildInto

func BuildInto(wr WriteRequest, tenant string, tsreq []prompb.TimeSeries) error

func Marshal

func Marshal(tenant string, tsreq []prompb.TimeSeries) ([]byte, error)

func MarshalPacked

func MarshalPacked(tenant string, tsreq []prompb.TimeSeries) ([]byte, error)

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

func Writer_Methods

func Writer_Methods(methods []server.Method, s Writer_Server) []server.Method

Writer_Methods appends Methods to a slice that invoke the methods on s. This can be used to create a more complicated Server.

func Writer_NewServer

func Writer_NewServer(s Writer_Server) *server.Server

Writer_NewServer creates a new Server from an implementation of Writer_Server.

Types

type BucketSpan

type BucketSpan capnp.Struct

func NewBucketSpan

func NewBucketSpan(s *capnp.Segment) (BucketSpan, error)

func NewRootBucketSpan

func NewRootBucketSpan(s *capnp.Segment) (BucketSpan, error)

func ReadRootBucketSpan

func ReadRootBucketSpan(msg *capnp.Message) (BucketSpan, error)

func (BucketSpan) DecodeFromPtr

func (BucketSpan) DecodeFromPtr(p capnp.Ptr) BucketSpan

func (BucketSpan) EncodeAsPtr

func (s BucketSpan) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (BucketSpan) IsValid

func (s BucketSpan) IsValid() bool

func (BucketSpan) Length

func (s BucketSpan) Length() uint32

func (BucketSpan) Message

func (s BucketSpan) Message() *capnp.Message

func (BucketSpan) Offset

func (s BucketSpan) Offset() int32

func (BucketSpan) Segment

func (s BucketSpan) Segment() *capnp.Segment

func (BucketSpan) SetLength

func (s BucketSpan) SetLength(v uint32)

func (BucketSpan) SetOffset

func (s BucketSpan) SetOffset(v int32)

func (BucketSpan) String

func (s BucketSpan) String() string

func (BucketSpan) ToPtr

func (s BucketSpan) ToPtr() capnp.Ptr

type BucketSpan_Future

type BucketSpan_Future struct{ *capnp.Future }

BucketSpan_Future is a wrapper for a BucketSpan promised by a client call.

func (BucketSpan_Future) Struct

func (f BucketSpan_Future) Struct() (BucketSpan, error)

type BucketSpan_List

type BucketSpan_List = capnp.StructList[BucketSpan]

BucketSpan_List is a list of BucketSpan.

func NewBucketSpan_List

func NewBucketSpan_List(s *capnp.Segment, sz int32) (BucketSpan_List, error)

NewBucketSpan creates a new list of BucketSpan.

type Dialer

type Dialer interface {
	Dial() (net.Conn, error)
}

type Exemplar

type Exemplar capnp.Struct

func NewExemplar

func NewExemplar(s *capnp.Segment) (Exemplar, error)

func NewRootExemplar

func NewRootExemplar(s *capnp.Segment) (Exemplar, error)

func ReadRootExemplar

func ReadRootExemplar(msg *capnp.Message) (Exemplar, error)

func (Exemplar) DecodeFromPtr

func (Exemplar) DecodeFromPtr(p capnp.Ptr) Exemplar

func (Exemplar) EncodeAsPtr

func (s Exemplar) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Exemplar) HasLabels

func (s Exemplar) HasLabels() bool

func (Exemplar) IsValid

func (s Exemplar) IsValid() bool

func (Exemplar) Labels

func (s Exemplar) Labels() (Label_List, error)

func (Exemplar) Message

func (s Exemplar) Message() *capnp.Message

func (Exemplar) NewLabels

func (s Exemplar) NewLabels(n int32) (Label_List, error)

NewLabels sets the labels field to a newly allocated Label_List, preferring placement in s's segment.

func (Exemplar) Segment

func (s Exemplar) Segment() *capnp.Segment

func (Exemplar) SetLabels

func (s Exemplar) SetLabels(v Label_List) error

func (Exemplar) SetTimestamp

func (s Exemplar) SetTimestamp(v int64)

func (Exemplar) SetValue

func (s Exemplar) SetValue(v float64)

func (Exemplar) String

func (s Exemplar) String() string

func (Exemplar) Timestamp

func (s Exemplar) Timestamp() int64

func (Exemplar) ToPtr

func (s Exemplar) ToPtr() capnp.Ptr

func (Exemplar) Value

func (s Exemplar) Value() float64

type Exemplar_Future

type Exemplar_Future struct{ *capnp.Future }

Exemplar_Future is a wrapper for a Exemplar promised by a client call.

func (Exemplar_Future) Struct

func (f Exemplar_Future) Struct() (Exemplar, error)

type Exemplar_List

type Exemplar_List = capnp.StructList[Exemplar]

Exemplar_List is a list of Exemplar.

func NewExemplar_List

func NewExemplar_List(s *capnp.Segment, sz int32) (Exemplar_List, error)

NewExemplar creates a new list of Exemplar.

type FloatSample

type FloatSample struct {
	Value     float64
	Timestamp int64
}

type Histogram

type Histogram capnp.Struct

func NewHistogram

func NewHistogram(s *capnp.Segment) (Histogram, error)

func NewRootHistogram

func NewRootHistogram(s *capnp.Segment) (Histogram, error)

func ReadRootHistogram

func ReadRootHistogram(msg *capnp.Message) (Histogram, error)

func (Histogram) Count

func (s Histogram) Count() Histogram_count

func (Histogram) DecodeFromPtr

func (Histogram) DecodeFromPtr(p capnp.Ptr) Histogram

func (Histogram) EncodeAsPtr

func (s Histogram) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Histogram) HasNegativeCounts

func (s Histogram) HasNegativeCounts() bool

func (Histogram) HasNegativeDeltas

func (s Histogram) HasNegativeDeltas() bool

func (Histogram) HasNegativeSpans

func (s Histogram) HasNegativeSpans() bool

func (Histogram) HasPositiveCounts

func (s Histogram) HasPositiveCounts() bool

func (Histogram) HasPositiveDeltas

func (s Histogram) HasPositiveDeltas() bool

func (Histogram) HasPositiveSpans

func (s Histogram) HasPositiveSpans() bool

func (Histogram) IsValid

func (s Histogram) IsValid() bool

func (Histogram) Message

func (s Histogram) Message() *capnp.Message

func (Histogram) NegativeCounts

func (s Histogram) NegativeCounts() (capnp.Float64List, error)

func (Histogram) NegativeDeltas

func (s Histogram) NegativeDeltas() (capnp.Int64List, error)

func (Histogram) NegativeSpans

func (s Histogram) NegativeSpans() (BucketSpan_List, error)

func (Histogram) NewNegativeCounts

func (s Histogram) NewNegativeCounts(n int32) (capnp.Float64List, error)

NewNegativeCounts sets the negativeCounts field to a newly allocated capnp.Float64List, preferring placement in s's segment.

func (Histogram) NewNegativeDeltas

func (s Histogram) NewNegativeDeltas(n int32) (capnp.Int64List, error)

NewNegativeDeltas sets the negativeDeltas field to a newly allocated capnp.Int64List, preferring placement in s's segment.

func (Histogram) NewNegativeSpans

func (s Histogram) NewNegativeSpans(n int32) (BucketSpan_List, error)

NewNegativeSpans sets the negativeSpans field to a newly allocated BucketSpan_List, preferring placement in s's segment.

func (Histogram) NewPositiveCounts

func (s Histogram) NewPositiveCounts(n int32) (capnp.Float64List, error)

NewPositiveCounts sets the positiveCounts field to a newly allocated capnp.Float64List, preferring placement in s's segment.

func (Histogram) NewPositiveDeltas

func (s Histogram) NewPositiveDeltas(n int32) (capnp.Int64List, error)

NewPositiveDeltas sets the positiveDeltas field to a newly allocated capnp.Int64List, preferring placement in s's segment.

func (Histogram) NewPositiveSpans

func (s Histogram) NewPositiveSpans(n int32) (BucketSpan_List, error)

NewPositiveSpans sets the positiveSpans field to a newly allocated BucketSpan_List, preferring placement in s's segment.

func (Histogram) PositiveCounts

func (s Histogram) PositiveCounts() (capnp.Float64List, error)

func (Histogram) PositiveDeltas

func (s Histogram) PositiveDeltas() (capnp.Int64List, error)

func (Histogram) PositiveSpans

func (s Histogram) PositiveSpans() (BucketSpan_List, error)

func (Histogram) ResetHint

func (s Histogram) ResetHint() Histogram_ResetHint

func (Histogram) Schema

func (s Histogram) Schema() int32

func (Histogram) Segment

func (s Histogram) Segment() *capnp.Segment

func (Histogram) SetNegativeCounts

func (s Histogram) SetNegativeCounts(v capnp.Float64List) error

func (Histogram) SetNegativeDeltas

func (s Histogram) SetNegativeDeltas(v capnp.Int64List) error

func (Histogram) SetNegativeSpans

func (s Histogram) SetNegativeSpans(v BucketSpan_List) error

func (Histogram) SetPositiveCounts

func (s Histogram) SetPositiveCounts(v capnp.Float64List) error

func (Histogram) SetPositiveDeltas

func (s Histogram) SetPositiveDeltas(v capnp.Int64List) error

func (Histogram) SetPositiveSpans

func (s Histogram) SetPositiveSpans(v BucketSpan_List) error

func (Histogram) SetResetHint

func (s Histogram) SetResetHint(v Histogram_ResetHint)

func (Histogram) SetSchema

func (s Histogram) SetSchema(v int32)

func (Histogram) SetSum

func (s Histogram) SetSum(v float64)

func (Histogram) SetTimestamp

func (s Histogram) SetTimestamp(v int64)

func (Histogram) SetZeroThreshold

func (s Histogram) SetZeroThreshold(v float64)

func (Histogram) String

func (s Histogram) String() string

func (Histogram) Sum

func (s Histogram) Sum() float64

func (Histogram) Timestamp

func (s Histogram) Timestamp() int64

func (Histogram) ToPtr

func (s Histogram) ToPtr() capnp.Ptr

func (Histogram) ZeroCount

func (s Histogram) ZeroCount() Histogram_zeroCount

func (Histogram) ZeroThreshold

func (s Histogram) ZeroThreshold() float64

type HistogramSample

type HistogramSample struct {
	Timestamp      int64
	Histogram      *histogram.Histogram
	FloatHistogram *histogram.FloatHistogram
}

type Histogram_Future

type Histogram_Future struct{ *capnp.Future }

Histogram_Future is a wrapper for a Histogram promised by a client call.

func (Histogram_Future) Count

func (Histogram_Future) Struct

func (f Histogram_Future) Struct() (Histogram, error)

func (Histogram_Future) ZeroCount

type Histogram_List

type Histogram_List = capnp.StructList[Histogram]

Histogram_List is a list of Histogram.

func NewHistogram_List

func NewHistogram_List(s *capnp.Segment, sz int32) (Histogram_List, error)

NewHistogram creates a new list of Histogram.

type Histogram_ResetHint

type Histogram_ResetHint uint16
const (
	Histogram_ResetHint_unknown Histogram_ResetHint = 0
	Histogram_ResetHint_yes     Histogram_ResetHint = 1
	Histogram_ResetHint_no      Histogram_ResetHint = 2
	Histogram_ResetHint_gauge   Histogram_ResetHint = 3
)

Values of Histogram_ResetHint.

func Histogram_ResetHintFromString

func Histogram_ResetHintFromString(c string) Histogram_ResetHint

Histogram_ResetHintFromString returns the enum value with a name, or the zero value if there's no such value.

func (Histogram_ResetHint) String

func (c Histogram_ResetHint) String() string

String returns the enum's constant name.

type Histogram_ResetHint_List

type Histogram_ResetHint_List = capnp.EnumList[Histogram_ResetHint]

func NewHistogram_ResetHint_List

func NewHistogram_ResetHint_List(s *capnp.Segment, sz int32) (Histogram_ResetHint_List, error)

type Histogram_count

type Histogram_count Histogram

func (Histogram_count) CountFloat

func (s Histogram_count) CountFloat() float64

func (Histogram_count) CountInt

func (s Histogram_count) CountInt() uint64

func (Histogram_count) IsValid

func (s Histogram_count) IsValid() bool

func (Histogram_count) Message

func (s Histogram_count) Message() *capnp.Message

func (Histogram_count) Segment

func (s Histogram_count) Segment() *capnp.Segment

func (Histogram_count) SetCountFloat

func (s Histogram_count) SetCountFloat(v float64)

func (Histogram_count) SetCountInt

func (s Histogram_count) SetCountInt(v uint64)

func (Histogram_count) Which

type Histogram_count_Future

type Histogram_count_Future struct{ *capnp.Future }

Histogram_count_Future is a wrapper for a Histogram_count promised by a client call.

func (Histogram_count_Future) Struct

type Histogram_count_Which

type Histogram_count_Which uint16
const (
	Histogram_count_Which_countInt   Histogram_count_Which = 0
	Histogram_count_Which_countFloat Histogram_count_Which = 1
)

func (Histogram_count_Which) String

func (w Histogram_count_Which) String() string

type Histogram_zeroCount

type Histogram_zeroCount Histogram

func (Histogram_zeroCount) IsValid

func (s Histogram_zeroCount) IsValid() bool

func (Histogram_zeroCount) Message

func (s Histogram_zeroCount) Message() *capnp.Message

func (Histogram_zeroCount) Segment

func (s Histogram_zeroCount) Segment() *capnp.Segment

func (Histogram_zeroCount) SetZeroCountFloat

func (s Histogram_zeroCount) SetZeroCountFloat(v float64)

func (Histogram_zeroCount) SetZeroCountInt

func (s Histogram_zeroCount) SetZeroCountInt(v uint64)

func (Histogram_zeroCount) Which

func (Histogram_zeroCount) ZeroCountFloat

func (s Histogram_zeroCount) ZeroCountFloat() float64

func (Histogram_zeroCount) ZeroCountInt

func (s Histogram_zeroCount) ZeroCountInt() uint64

type Histogram_zeroCount_Future

type Histogram_zeroCount_Future struct{ *capnp.Future }

Histogram_zeroCount_Future is a wrapper for a Histogram_zeroCount promised by a client call.

func (Histogram_zeroCount_Future) Struct

type Histogram_zeroCount_Which

type Histogram_zeroCount_Which uint16
const (
	Histogram_zeroCount_Which_zeroCountInt   Histogram_zeroCount_Which = 0
	Histogram_zeroCount_Which_zeroCountFloat Histogram_zeroCount_Which = 1
)

func (Histogram_zeroCount_Which) String

func (w Histogram_zeroCount_Which) String() string

type Label

type Label capnp.Struct

func NewLabel

func NewLabel(s *capnp.Segment) (Label, error)

func NewRootLabel

func NewRootLabel(s *capnp.Segment) (Label, error)

func ReadRootLabel

func ReadRootLabel(msg *capnp.Message) (Label, error)

func (Label) DecodeFromPtr

func (Label) DecodeFromPtr(p capnp.Ptr) Label

func (Label) EncodeAsPtr

func (s Label) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Label) IsValid

func (s Label) IsValid() bool

func (Label) Message

func (s Label) Message() *capnp.Message

func (Label) Name

func (s Label) Name() uint32

func (Label) Segment

func (s Label) Segment() *capnp.Segment

func (Label) SetName

func (s Label) SetName(v uint32)

func (Label) SetValue

func (s Label) SetValue(v uint32)

func (Label) String

func (s Label) String() string

func (Label) ToPtr

func (s Label) ToPtr() capnp.Ptr

func (Label) Value

func (s Label) Value() uint32

type Label_Future

type Label_Future struct{ *capnp.Future }

Label_Future is a wrapper for a Label promised by a client call.

func (Label_Future) Struct

func (f Label_Future) Struct() (Label, error)

type Label_List

type Label_List = capnp.StructList[Label]

Label_List is a list of Label.

func NewLabel_List

func NewLabel_List(s *capnp.Segment, sz int32) (Label_List, error)

NewLabel creates a new list of Label.

type RemoteWriteClient

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

func NewRemoteWriteClient

func NewRemoteWriteClient(dialer Dialer, logger log.Logger) *RemoteWriteClient

func (*RemoteWriteClient) Close

func (r *RemoteWriteClient) Close() error

func (*RemoteWriteClient) RemoteWrite

type Request

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

func NewRequest

func NewRequest(wr WriteRequest) (*Request, error)

func (*Request) At

func (s *Request) At(t *Series) error

func (*Request) Close

func (s *Request) Close() error

func (*Request) Next

func (s *Request) Next() bool

type Sample

type Sample capnp.Struct

func NewRootSample

func NewRootSample(s *capnp.Segment) (Sample, error)

func NewSample

func NewSample(s *capnp.Segment) (Sample, error)

func ReadRootSample

func ReadRootSample(msg *capnp.Message) (Sample, error)

func (Sample) DecodeFromPtr

func (Sample) DecodeFromPtr(p capnp.Ptr) Sample

func (Sample) EncodeAsPtr

func (s Sample) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Sample) IsValid

func (s Sample) IsValid() bool

func (Sample) Message

func (s Sample) Message() *capnp.Message

func (Sample) Segment

func (s Sample) Segment() *capnp.Segment

func (Sample) SetTimestamp

func (s Sample) SetTimestamp(v int64)

func (Sample) SetValue

func (s Sample) SetValue(v float64)

func (Sample) String

func (s Sample) String() string

func (Sample) Timestamp

func (s Sample) Timestamp() int64

func (Sample) ToPtr

func (s Sample) ToPtr() capnp.Ptr

func (Sample) Value

func (s Sample) Value() float64

type Sample_Future

type Sample_Future struct{ *capnp.Future }

Sample_Future is a wrapper for a Sample promised by a client call.

func (Sample_Future) Struct

func (f Sample_Future) Struct() (Sample, error)

type Sample_List

type Sample_List = capnp.StructList[Sample]

Sample_List is a list of Sample.

func NewSample_List

func NewSample_List(s *capnp.Segment, sz int32) (Sample_List, error)

NewSample creates a new list of Sample.

type Series

type Series struct {
	Labels     labels.Labels
	Samples    []FloatSample
	Histograms []HistogramSample
	Exemplars  []exemplar.Exemplar
}

type Symbols

type Symbols capnp.Struct

func NewRootSymbols

func NewRootSymbols(s *capnp.Segment) (Symbols, error)

func NewSymbols

func NewSymbols(s *capnp.Segment) (Symbols, error)

func ReadRootSymbols

func ReadRootSymbols(msg *capnp.Message) (Symbols, error)

func (Symbols) Data

func (s Symbols) Data() ([]byte, error)

func (Symbols) DecodeFromPtr

func (Symbols) DecodeFromPtr(p capnp.Ptr) Symbols

func (Symbols) EncodeAsPtr

func (s Symbols) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Symbols) HasData

func (s Symbols) HasData() bool

func (Symbols) HasOffsets

func (s Symbols) HasOffsets() bool

func (Symbols) IsValid

func (s Symbols) IsValid() bool

func (Symbols) Message

func (s Symbols) Message() *capnp.Message

func (Symbols) NewOffsets

func (s Symbols) NewOffsets(n int32) (capnp.UInt32List, error)

NewOffsets sets the offsets field to a newly allocated capnp.UInt32List, preferring placement in s's segment.

func (Symbols) Offsets

func (s Symbols) Offsets() (capnp.UInt32List, error)

func (Symbols) Segment

func (s Symbols) Segment() *capnp.Segment

func (Symbols) SetData

func (s Symbols) SetData(v []byte) error

func (Symbols) SetOffsets

func (s Symbols) SetOffsets(v capnp.UInt32List) error

func (Symbols) String

func (s Symbols) String() string

func (Symbols) ToPtr

func (s Symbols) ToPtr() capnp.Ptr

type Symbols_Future

type Symbols_Future struct{ *capnp.Future }

Symbols_Future is a wrapper for a Symbols promised by a client call.

func (Symbols_Future) Struct

func (f Symbols_Future) Struct() (Symbols, error)

type Symbols_List

type Symbols_List = capnp.StructList[Symbols]

Symbols_List is a list of Symbols.

func NewSymbols_List

func NewSymbols_List(s *capnp.Segment, sz int32) (Symbols_List, error)

NewSymbols creates a new list of Symbols.

type TCPDialer

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

func NewTCPDialer

func NewTCPDialer(address string) *TCPDialer

func (TCPDialer) Dial

func (t TCPDialer) Dial() (net.Conn, error)

type TimeSeries

type TimeSeries capnp.Struct

func NewRootTimeSeries

func NewRootTimeSeries(s *capnp.Segment) (TimeSeries, error)

func NewTimeSeries

func NewTimeSeries(s *capnp.Segment) (TimeSeries, error)

func ReadRootTimeSeries

func ReadRootTimeSeries(msg *capnp.Message) (TimeSeries, error)

func (TimeSeries) DecodeFromPtr

func (TimeSeries) DecodeFromPtr(p capnp.Ptr) TimeSeries

func (TimeSeries) EncodeAsPtr

func (s TimeSeries) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (TimeSeries) Exemplars

func (s TimeSeries) Exemplars() (Exemplar_List, error)

func (TimeSeries) HasExemplars

func (s TimeSeries) HasExemplars() bool

func (TimeSeries) HasHistograms

func (s TimeSeries) HasHistograms() bool

func (TimeSeries) HasLabels

func (s TimeSeries) HasLabels() bool

func (TimeSeries) HasSamples

func (s TimeSeries) HasSamples() bool

func (TimeSeries) Histograms

func (s TimeSeries) Histograms() (Histogram_List, error)

func (TimeSeries) IsValid

func (s TimeSeries) IsValid() bool

func (TimeSeries) Labels

func (s TimeSeries) Labels() (Label_List, error)

func (TimeSeries) Message

func (s TimeSeries) Message() *capnp.Message

func (TimeSeries) NewExemplars

func (s TimeSeries) NewExemplars(n int32) (Exemplar_List, error)

NewExemplars sets the exemplars field to a newly allocated Exemplar_List, preferring placement in s's segment.

func (TimeSeries) NewHistograms

func (s TimeSeries) NewHistograms(n int32) (Histogram_List, error)

NewHistograms sets the histograms field to a newly allocated Histogram_List, preferring placement in s's segment.

func (TimeSeries) NewLabels

func (s TimeSeries) NewLabels(n int32) (Label_List, error)

NewLabels sets the labels field to a newly allocated Label_List, preferring placement in s's segment.

func (TimeSeries) NewSamples

func (s TimeSeries) NewSamples(n int32) (Sample_List, error)

NewSamples sets the samples field to a newly allocated Sample_List, preferring placement in s's segment.

func (TimeSeries) Samples

func (s TimeSeries) Samples() (Sample_List, error)

func (TimeSeries) Segment

func (s TimeSeries) Segment() *capnp.Segment

func (TimeSeries) SetExemplars

func (s TimeSeries) SetExemplars(v Exemplar_List) error

func (TimeSeries) SetHistograms

func (s TimeSeries) SetHistograms(v Histogram_List) error

func (TimeSeries) SetLabels

func (s TimeSeries) SetLabels(v Label_List) error

func (TimeSeries) SetSamples

func (s TimeSeries) SetSamples(v Sample_List) error

func (TimeSeries) String

func (s TimeSeries) String() string

func (TimeSeries) ToPtr

func (s TimeSeries) ToPtr() capnp.Ptr

type TimeSeries_Future

type TimeSeries_Future struct{ *capnp.Future }

TimeSeries_Future is a wrapper for a TimeSeries promised by a client call.

func (TimeSeries_Future) Struct

func (f TimeSeries_Future) Struct() (TimeSeries, error)

type TimeSeries_List

type TimeSeries_List = capnp.StructList[TimeSeries]

TimeSeries_List is a list of TimeSeries.

func NewTimeSeries_List

func NewTimeSeries_List(s *capnp.Segment, sz int32) (TimeSeries_List, error)

NewTimeSeries creates a new list of TimeSeries.

type WriteError

type WriteError uint16
const (
	WriteError_none            WriteError = 0
	WriteError_unavailable     WriteError = 1
	WriteError_alreadyExists   WriteError = 2
	WriteError_invalidArgument WriteError = 3
	WriteError_internal        WriteError = 4
)

Values of WriteError.

func WriteErrorFromString

func WriteErrorFromString(c string) WriteError

WriteErrorFromString returns the enum value with a name, or the zero value if there's no such value.

func (WriteError) String

func (c WriteError) String() string

String returns the enum's constant name.

type WriteError_List

type WriteError_List = capnp.EnumList[WriteError]

func NewWriteError_List

func NewWriteError_List(s *capnp.Segment, sz int32) (WriteError_List, error)

type WriteRequest

type WriteRequest capnp.Struct

func Build

func Build(tenant string, tsreq []prompb.TimeSeries) (WriteRequest, error)

func NewRootWriteRequest

func NewRootWriteRequest(s *capnp.Segment) (WriteRequest, error)

func NewWriteRequest

func NewWriteRequest(s *capnp.Segment) (WriteRequest, error)

func ReadRootWriteRequest

func ReadRootWriteRequest(msg *capnp.Message) (WriteRequest, error)

func (WriteRequest) DecodeFromPtr

func (WriteRequest) DecodeFromPtr(p capnp.Ptr) WriteRequest

func (WriteRequest) EncodeAsPtr

func (s WriteRequest) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (WriteRequest) HasSymbols

func (s WriteRequest) HasSymbols() bool

func (WriteRequest) HasTenant

func (s WriteRequest) HasTenant() bool

func (WriteRequest) HasTimeSeries

func (s WriteRequest) HasTimeSeries() bool

func (WriteRequest) IsValid

func (s WriteRequest) IsValid() bool

func (WriteRequest) Message

func (s WriteRequest) Message() *capnp.Message

func (WriteRequest) NewSymbols

func (s WriteRequest) NewSymbols() (Symbols, error)

NewSymbols sets the symbols field to a newly allocated Symbols struct, preferring placement in s's segment.

func (WriteRequest) NewTimeSeries

func (s WriteRequest) NewTimeSeries(n int32) (TimeSeries_List, error)

NewTimeSeries sets the timeSeries field to a newly allocated TimeSeries_List, preferring placement in s's segment.

func (WriteRequest) Segment

func (s WriteRequest) Segment() *capnp.Segment

func (WriteRequest) SetSymbols

func (s WriteRequest) SetSymbols(v Symbols) error

func (WriteRequest) SetTenant

func (s WriteRequest) SetTenant(v string) error

func (WriteRequest) SetTimeSeries

func (s WriteRequest) SetTimeSeries(v TimeSeries_List) error

func (WriteRequest) String

func (s WriteRequest) String() string

func (WriteRequest) Symbols

func (s WriteRequest) Symbols() (Symbols, error)

func (WriteRequest) Tenant

func (s WriteRequest) Tenant() (string, error)

func (WriteRequest) TenantBytes

func (s WriteRequest) TenantBytes() ([]byte, error)

func (WriteRequest) TimeSeries

func (s WriteRequest) TimeSeries() (TimeSeries_List, error)

func (WriteRequest) ToPtr

func (s WriteRequest) ToPtr() capnp.Ptr

type WriteRequest_Future

type WriteRequest_Future struct{ *capnp.Future }

WriteRequest_Future is a wrapper for a WriteRequest promised by a client call.

func (WriteRequest_Future) Struct

func (f WriteRequest_Future) Struct() (WriteRequest, error)

func (WriteRequest_Future) Symbols

func (p WriteRequest_Future) Symbols() Symbols_Future

type WriteRequest_List

type WriteRequest_List = capnp.StructList[WriteRequest]

WriteRequest_List is a list of WriteRequest.

func NewWriteRequest_List

func NewWriteRequest_List(s *capnp.Segment, sz int32) (WriteRequest_List, error)

NewWriteRequest creates a new list of WriteRequest.

type Writer

type Writer capnp.Client

func Writer_ServerToClient

func Writer_ServerToClient(s Writer_Server) Writer

Writer_ServerToClient creates a new Client from an implementation of Writer_Server. The caller is responsible for calling Release on the returned Client.

func (Writer) AddRef

func (c Writer) AddRef() Writer

AddRef creates a new Client that refers to the same capability as c. If c is nil or has resolved to null, then AddRef returns nil.

func (Writer) DecodeFromPtr

func (Writer) DecodeFromPtr(p capnp.Ptr) Writer

func (Writer) EncodeAsPtr

func (c Writer) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Writer) GetFlowLimiter

func (c Writer) GetFlowLimiter() fc.FlowLimiter

Get the current flowcontrol.FlowLimiter used to manage flow control for this client.

func (Writer) IsSame

func (c Writer) IsSame(other Writer) bool

IsSame reports whether c and other refer to a capability created by the same call to NewClient. This can return false negatives if c or other are not fully resolved: use Resolve if this is an issue. If either c or other are released, then IsSame panics.

func (Writer) IsValid

func (c Writer) IsValid() bool

IsValid reports whether c is a valid reference to a capability. A reference is invalid if it is nil, has resolved to null, or has been released.

func (Writer) Release

func (c Writer) Release()

Release releases a capability reference. If this is the last reference to the capability, then the underlying resources associated with the capability will be released.

Release will panic if c has already been released, but not if c is nil or resolved to null.

func (Writer) Resolve

func (c Writer) Resolve(ctx context.Context) error

Resolve blocks until the capability is fully resolved or the Context expires.

func (Writer) SetFlowLimiter

func (c Writer) SetFlowLimiter(lim fc.FlowLimiter)

Update the flowcontrol.FlowLimiter used to manage flow control for this client. This affects all future calls, but not calls already waiting to send. Passing nil sets the value to flowcontrol.NopLimiter, which is also the default.

func (Writer) String

func (c Writer) String() string

String returns a string that identifies this capability for debugging purposes. Its format should not be depended on: in particular, it should not be used to compare clients. Use IsSame to compare clients for equality.

func (Writer) WaitStreaming

func (c Writer) WaitStreaming() error

type Writer_List

type Writer_List = capnp.CapList[Writer]

Writer_List is a list of Writer.

func NewWriter_List

func NewWriter_List(s *capnp.Segment, sz int32) (Writer_List, error)

NewWriter_List creates a new list of Writer.

type Writer_Server

type Writer_Server interface {
	Write(context.Context, Writer_write) error
}

A Writer_Server is a Writer with a local implementation.

type Writer_write

type Writer_write struct {
	*server.Call
}

Writer_write holds the state for a server call to Writer.write. See server.Call for documentation.

func (Writer_write) AllocResults

func (c Writer_write) AllocResults() (Writer_write_Results, error)

AllocResults allocates the results struct.

func (Writer_write) Args

Args returns the call's arguments.

type Writer_write_Params

type Writer_write_Params capnp.Struct

func NewRootWriter_write_Params

func NewRootWriter_write_Params(s *capnp.Segment) (Writer_write_Params, error)

func NewWriter_write_Params

func NewWriter_write_Params(s *capnp.Segment) (Writer_write_Params, error)

func ReadRootWriter_write_Params

func ReadRootWriter_write_Params(msg *capnp.Message) (Writer_write_Params, error)

func (Writer_write_Params) DecodeFromPtr

func (Writer_write_Params) EncodeAsPtr

func (s Writer_write_Params) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Writer_write_Params) HasWr

func (s Writer_write_Params) HasWr() bool

func (Writer_write_Params) IsValid

func (s Writer_write_Params) IsValid() bool

func (Writer_write_Params) Message

func (s Writer_write_Params) Message() *capnp.Message

func (Writer_write_Params) NewWr

func (s Writer_write_Params) NewWr() (WriteRequest, error)

NewWr sets the wr field to a newly allocated WriteRequest struct, preferring placement in s's segment.

func (Writer_write_Params) Segment

func (s Writer_write_Params) Segment() *capnp.Segment

func (Writer_write_Params) SetWr

func (Writer_write_Params) String

func (s Writer_write_Params) String() string

func (Writer_write_Params) ToPtr

func (s Writer_write_Params) ToPtr() capnp.Ptr

func (Writer_write_Params) Wr

type Writer_write_Params_Future

type Writer_write_Params_Future struct{ *capnp.Future }

Writer_write_Params_Future is a wrapper for a Writer_write_Params promised by a client call.

func (Writer_write_Params_Future) Struct

func (Writer_write_Params_Future) Wr

type Writer_write_Params_List

type Writer_write_Params_List = capnp.StructList[Writer_write_Params]

Writer_write_Params_List is a list of Writer_write_Params.

func NewWriter_write_Params_List

func NewWriter_write_Params_List(s *capnp.Segment, sz int32) (Writer_write_Params_List, error)

NewWriter_write_Params creates a new list of Writer_write_Params.

type Writer_write_Results

type Writer_write_Results capnp.Struct

func NewRootWriter_write_Results

func NewRootWriter_write_Results(s *capnp.Segment) (Writer_write_Results, error)

func NewWriter_write_Results

func NewWriter_write_Results(s *capnp.Segment) (Writer_write_Results, error)

func ReadRootWriter_write_Results

func ReadRootWriter_write_Results(msg *capnp.Message) (Writer_write_Results, error)

func (Writer_write_Results) DecodeFromPtr

func (Writer_write_Results) EncodeAsPtr

func (s Writer_write_Results) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Writer_write_Results) Error

func (s Writer_write_Results) Error() WriteError

func (Writer_write_Results) IsValid

func (s Writer_write_Results) IsValid() bool

func (Writer_write_Results) Message

func (s Writer_write_Results) Message() *capnp.Message

func (Writer_write_Results) Segment

func (s Writer_write_Results) Segment() *capnp.Segment

func (Writer_write_Results) SetError

func (s Writer_write_Results) SetError(v WriteError)

func (Writer_write_Results) String

func (s Writer_write_Results) String() string

func (Writer_write_Results) ToPtr

func (s Writer_write_Results) ToPtr() capnp.Ptr

type Writer_write_Results_Future

type Writer_write_Results_Future struct{ *capnp.Future }

Writer_write_Results_Future is a wrapper for a Writer_write_Results promised by a client call.

func (Writer_write_Results_Future) Struct

type Writer_write_Results_List

type Writer_write_Results_List = capnp.StructList[Writer_write_Results]

Writer_write_Results_List is a list of Writer_write_Results.

func NewWriter_write_Results_List

func NewWriter_write_Results_List(s *capnp.Segment, sz int32) (Writer_write_Results_List, error)

NewWriter_write_Results creates a new list of Writer_write_Results.

Jump to

Keyboard shortcuts

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