loki

package
v1.101.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPush = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPush   = fmt.Errorf("proto: integer overflow")
)

Functions

func RequestHandler

func RequestHandler(path string, w http.ResponseWriter, r *http.Request) bool

RequestHandler processes Loki insert requests

Types

type Entry

type Entry struct {
	Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"ts"`
	Line      string    `protobuf:"bytes,2,opt,name=line,proto3" json:"line"`
}

Entry is a log entry with a timestamp.

func (*Entry) Equal

func (m *Entry) Equal(that interface{}) bool

Equal returns true if the two Entries are equal.

func (*Entry) Marshal

func (m *Entry) Marshal() (dAtA []byte, err error)

Marshal implements the proto.Marshaler interface.

func (*Entry) MarshalTo

func (m *Entry) MarshalTo(dAtA []byte) (int, error)

MarshalTo marshals m to dst.

func (*Entry) MarshalToSizedBuffer

func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)

MarshalToSizedBuffer marshals m to the sized buffer.

func (*Entry) Size

func (m *Entry) Size() (n int)

Size returns the size of the serialized Entry

func (*Entry) Unmarshal

func (m *Entry) Unmarshal(dAtA []byte) error

Unmarshal unmarshals the given data into m.

type EntryAdapter

type EntryAdapter struct {
	Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"ts"`
	Line      string    `protobuf:"bytes,2,opt,name=line,proto3" json:"line"`
}

func (*EntryAdapter) Equal

func (this *EntryAdapter) Equal(that interface{}) bool

func (*EntryAdapter) GetLine

func (m *EntryAdapter) GetLine() string

func (*EntryAdapter) GetTimestamp

func (m *EntryAdapter) GetTimestamp() time.Time

func (*EntryAdapter) GoString

func (this *EntryAdapter) GoString() string

func (*EntryAdapter) Marshal

func (m *EntryAdapter) Marshal() (dAtA []byte, err error)

func (*EntryAdapter) MarshalTo

func (m *EntryAdapter) MarshalTo(dAtA []byte) (int, error)

func (*EntryAdapter) MarshalToSizedBuffer

func (m *EntryAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EntryAdapter) Reset

func (m *EntryAdapter) Reset()

func (*EntryAdapter) Size

func (m *EntryAdapter) Size() (n int)

func (*EntryAdapter) String

func (this *EntryAdapter) String() string

func (*EntryAdapter) Unmarshal

func (m *EntryAdapter) Unmarshal(dAtA []byte) error

type PushRequest

type PushRequest struct {
	Streams []Stream `protobuf:"bytes,1,rep,name=streams,proto3,customtype=Stream" json:"streams"`
}

func (*PushRequest) Equal

func (this *PushRequest) Equal(that interface{}) bool

func (*PushRequest) GoString

func (this *PushRequest) GoString() string

func (*PushRequest) Marshal

func (m *PushRequest) Marshal() (dAtA []byte, err error)

func (*PushRequest) MarshalTo

func (m *PushRequest) MarshalTo(dAtA []byte) (int, error)

func (*PushRequest) MarshalToSizedBuffer

func (m *PushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PushRequest) Reset

func (m *PushRequest) Reset()

func (*PushRequest) Size

func (m *PushRequest) Size() (n int)

func (*PushRequest) String

func (this *PushRequest) String() string

func (*PushRequest) Unmarshal

func (m *PushRequest) Unmarshal(dAtA []byte) error

type PushResponse

type PushResponse struct {
}

func (*PushResponse) Equal

func (this *PushResponse) Equal(that interface{}) bool

func (*PushResponse) GoString

func (this *PushResponse) GoString() string

func (*PushResponse) Marshal

func (m *PushResponse) Marshal() (dAtA []byte, err error)

func (*PushResponse) MarshalTo

func (m *PushResponse) MarshalTo(dAtA []byte) (int, error)

func (*PushResponse) MarshalToSizedBuffer

func (m *PushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PushResponse) Reset

func (m *PushResponse) Reset()

func (*PushResponse) Size

func (m *PushResponse) Size() (n int)

func (*PushResponse) String

func (this *PushResponse) String() string

func (*PushResponse) Unmarshal

func (m *PushResponse) Unmarshal(dAtA []byte) error

type Stream

type Stream struct {
	Labels  string  `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels"`
	Entries []Entry `protobuf:"bytes,2,rep,name=entries,proto3,customtype=EntryAdapter" json:"entries"`
	Hash    uint64  `protobuf:"varint,3,opt,name=hash,proto3" json:"-"`
}

Stream contains a unique labels set as a string and a set of entries for it. We are not using the proto generated version but this custom one so that we can improve serialization see benchmark.

func (*Stream) Equal

func (m *Stream) Equal(that interface{}) bool

Equal returns true if the two Streams are equal.

func (*Stream) Marshal

func (m *Stream) Marshal() (dAtA []byte, err error)

Marshal implements the proto.Marshaler interface.

func (*Stream) MarshalTo

func (m *Stream) MarshalTo(dAtA []byte) (int, error)

MarshalTo marshals m to dst.

func (*Stream) MarshalToSizedBuffer

func (m *Stream) MarshalToSizedBuffer(dAtA []byte) (int, error)

MarshalToSizedBuffer marshals m to the sized buffer.

func (*Stream) Size

func (m *Stream) Size() (n int)

Size returns the size of the serialized Stream.

func (*Stream) Unmarshal

func (m *Stream) Unmarshal(dAtA []byte) error

Unmarshal unmarshals the given data into m.

type StreamAdapter

type StreamAdapter struct {
	Labels  string         `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels"`
	Entries []EntryAdapter `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries"`
	// hash contains the original hash of the stream.
	Hash uint64 `protobuf:"varint,3,opt,name=hash,proto3" json:"-"`
}

func (*StreamAdapter) Equal

func (this *StreamAdapter) Equal(that interface{}) bool

func (*StreamAdapter) GetEntries

func (m *StreamAdapter) GetEntries() []EntryAdapter

func (*StreamAdapter) GetHash

func (m *StreamAdapter) GetHash() uint64

func (*StreamAdapter) GetLabels

func (m *StreamAdapter) GetLabels() string

func (*StreamAdapter) GoString

func (this *StreamAdapter) GoString() string

func (*StreamAdapter) Marshal

func (m *StreamAdapter) Marshal() (dAtA []byte, err error)

func (*StreamAdapter) MarshalTo

func (m *StreamAdapter) MarshalTo(dAtA []byte) (int, error)

func (*StreamAdapter) MarshalToSizedBuffer

func (m *StreamAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StreamAdapter) Reset

func (m *StreamAdapter) Reset()

func (*StreamAdapter) Size

func (m *StreamAdapter) Size() (n int)

func (*StreamAdapter) String

func (this *StreamAdapter) String() string

func (*StreamAdapter) Unmarshal

func (m *StreamAdapter) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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