Documentation
¶
Index ¶
- Variables
- func RegisterPusherRF1Server(s *grpc.Server, srv PusherRF1Server)
- func RegisterPusherServer(s *grpc.Server, srv PusherServer)
- func SizeOfStdTime(t time.Time) int
- func StdTimeMarshalTo(t time.Time, data []byte) (int, error)
- func StdTimeUnmarshal(t *time.Time, data []byte) error
- type Entry
- func (m *Entry) Equal(that interface{}) bool
- func (m *Entry) Marshal() (dAtA []byte, err error)
- func (m *Entry) MarshalJSON() ([]byte, error)
- func (m *Entry) MarshalTo(dAtA []byte) (int, error)
- func (m *Entry) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Entry) Size() (n int)
- func (m *Entry) Unmarshal(dAtA []byte) error
- type EntryAdapter
- func (*EntryAdapter) Descriptor() ([]byte, []int)
- func (this *EntryAdapter) Equal(that interface{}) bool
- func (m *EntryAdapter) GetLine() string
- func (m *EntryAdapter) GetParsed() []LabelPairAdapter
- func (m *EntryAdapter) GetStructuredMetadata() []LabelPairAdapter
- func (m *EntryAdapter) GetTimestamp() time.Time
- func (this *EntryAdapter) GoString() string
- func (m *EntryAdapter) Marshal() (dAtA []byte, err error)
- func (m *EntryAdapter) MarshalTo(dAtA []byte) (int, error)
- func (m *EntryAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EntryAdapter) ProtoMessage()
- func (m *EntryAdapter) Reset()
- func (m *EntryAdapter) Size() (n int)
- func (this *EntryAdapter) String() string
- func (m *EntryAdapter) Unmarshal(dAtA []byte) error
- func (m *EntryAdapter) XXX_DiscardUnknown()
- func (m *EntryAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EntryAdapter) XXX_Merge(src proto.Message)
- func (m *EntryAdapter) XXX_Size() int
- func (m *EntryAdapter) XXX_Unmarshal(b []byte) error
- type LabelAdapter
- func (m *LabelAdapter) Compare(other LabelAdapter) int
- func (m *LabelAdapter) Equal(other LabelAdapter) bool
- func (m *LabelAdapter) Marshal() (dAtA []byte, err error)
- func (m *LabelAdapter) MarshalTo(dAtA []byte) (int, error)
- func (m *LabelAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *LabelAdapter) Size() (n int)
- func (m *LabelAdapter) Unmarshal(dAtA []byte) error
- type LabelPairAdapter
- func (*LabelPairAdapter) Descriptor() ([]byte, []int)
- func (this *LabelPairAdapter) Equal(that interface{}) bool
- func (m *LabelPairAdapter) GetName() string
- func (m *LabelPairAdapter) GetValue() string
- func (this *LabelPairAdapter) GoString() string
- func (m *LabelPairAdapter) Marshal() (dAtA []byte, err error)
- func (m *LabelPairAdapter) MarshalTo(dAtA []byte) (int, error)
- func (m *LabelPairAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LabelPairAdapter) ProtoMessage()
- func (m *LabelPairAdapter) Reset()
- func (m *LabelPairAdapter) Size() (n int)
- func (this *LabelPairAdapter) String() string
- func (m *LabelPairAdapter) Unmarshal(dAtA []byte) error
- func (m *LabelPairAdapter) XXX_DiscardUnknown()
- func (m *LabelPairAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LabelPairAdapter) XXX_Merge(src proto.Message)
- func (m *LabelPairAdapter) XXX_Size() int
- func (m *LabelPairAdapter) XXX_Unmarshal(b []byte) error
- type LabelsAdapter
- type PushRequest
- func (*PushRequest) Descriptor() ([]byte, []int)
- func (this *PushRequest) Equal(that interface{}) bool
- func (this *PushRequest) GoString() string
- func (m *PushRequest) Marshal() (dAtA []byte, err error)
- func (m *PushRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *PushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PushRequest) ProtoMessage()
- func (m *PushRequest) Reset()
- func (m *PushRequest) Size() (n int)
- func (this *PushRequest) String() string
- func (m *PushRequest) Unmarshal(dAtA []byte) error
- func (m *PushRequest) XXX_DiscardUnknown()
- func (m *PushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushRequest) XXX_Merge(src proto.Message)
- func (m *PushRequest) XXX_Size() int
- func (m *PushRequest) XXX_Unmarshal(b []byte) error
- type PushResponse
- func (*PushResponse) Descriptor() ([]byte, []int)
- func (this *PushResponse) Equal(that interface{}) bool
- func (this *PushResponse) GoString() string
- func (m *PushResponse) Marshal() (dAtA []byte, err error)
- func (m *PushResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *PushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PushResponse) ProtoMessage()
- func (m *PushResponse) Reset()
- func (m *PushResponse) Size() (n int)
- func (this *PushResponse) String() string
- func (m *PushResponse) Unmarshal(dAtA []byte) error
- func (m *PushResponse) XXX_DiscardUnknown()
- func (m *PushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PushResponse) XXX_Merge(src proto.Message)
- func (m *PushResponse) XXX_Size() int
- func (m *PushResponse) XXX_Unmarshal(b []byte) error
- type PusherClient
- type PusherRF1Client
- type PusherRF1Server
- type PusherServer
- type Stream
- func (m *Stream) Equal(that interface{}) bool
- func (m *Stream) Marshal() (dAtA []byte, err error)
- func (m *Stream) MarshalJSON() ([]byte, error)
- func (m *Stream) MarshalTo(dAtA []byte) (int, error)
- func (m *Stream) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *Stream) Size() (n int)
- func (m *Stream) Unmarshal(dAtA []byte) error
- type StreamAdapter
- func (*StreamAdapter) Descriptor() ([]byte, []int)
- func (this *StreamAdapter) Equal(that interface{}) bool
- func (m *StreamAdapter) GetEntries() []EntryAdapter
- func (m *StreamAdapter) GetHash() uint64
- func (m *StreamAdapter) GetLabels() string
- func (this *StreamAdapter) GoString() string
- func (m *StreamAdapter) Marshal() (dAtA []byte, err error)
- func (m *StreamAdapter) MarshalTo(dAtA []byte) (int, error)
- func (m *StreamAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StreamAdapter) ProtoMessage()
- func (m *StreamAdapter) Reset()
- func (m *StreamAdapter) Size() (n int)
- func (this *StreamAdapter) String() string
- func (m *StreamAdapter) Unmarshal(dAtA []byte) error
- func (m *StreamAdapter) XXX_DiscardUnknown()
- func (m *StreamAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamAdapter) XXX_Merge(src proto.Message)
- func (m *StreamAdapter) XXX_Size() int
- func (m *StreamAdapter) XXX_Unmarshal(b []byte) error
- type UnimplementedPusherRF1Server
- type UnimplementedPusherServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthPush = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPush = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterPusherRF1Server ¶
func RegisterPusherRF1Server(s *grpc.Server, srv PusherRF1Server)
func RegisterPusherServer ¶
func RegisterPusherServer(s *grpc.Server, srv PusherServer)
func SizeOfStdTime ¶
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"` StructuredMetadata LabelsAdapter `protobuf:"bytes,3,opt,name=structuredMetadata,proto3" json:"structuredMetadata,omitempty"` Parsed LabelsAdapter `protobuf:"bytes,4,opt,name=parsed,proto3" json:"parsed,omitempty"` }
Entry is a log entry with a timestamp.
func (*Entry) MarshalJSON ¶
MarshalJSON implements json.Marshaler. In Loki, this method should only be used by the Legacy encoder used when hitting the deprecated /api/promt/query endpoint. We will ignore the structured metadata.
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"` StructuredMetadata []LabelPairAdapter `protobuf:"bytes,3,rep,name=structuredMetadata,proto3" json:"structuredMetadata,omitempty"` // This field shouldn't be used by clients to push data to Loki. // It is only used by Loki to return parsed log lines in query responses. // TODO: Remove this field from the write path Proto. Parsed []LabelPairAdapter `protobuf:"bytes,4,rep,name=parsed,proto3" json:"parsed,omitempty"` }
func (*EntryAdapter) Descriptor ¶
func (*EntryAdapter) Descriptor() ([]byte, []int)
func (*EntryAdapter) Equal ¶
func (this *EntryAdapter) Equal(that interface{}) bool
func (*EntryAdapter) GetLine ¶
func (m *EntryAdapter) GetLine() string
func (*EntryAdapter) GetParsed ¶
func (m *EntryAdapter) GetParsed() []LabelPairAdapter
func (*EntryAdapter) GetStructuredMetadata ¶
func (m *EntryAdapter) GetStructuredMetadata() []LabelPairAdapter
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) MarshalToSizedBuffer ¶
func (m *EntryAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EntryAdapter) ProtoMessage ¶
func (*EntryAdapter) ProtoMessage()
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
func (*EntryAdapter) XXX_DiscardUnknown ¶
func (m *EntryAdapter) XXX_DiscardUnknown()
func (*EntryAdapter) XXX_Marshal ¶
func (m *EntryAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EntryAdapter) XXX_Merge ¶
func (m *EntryAdapter) XXX_Merge(src proto.Message)
func (*EntryAdapter) XXX_Size ¶
func (m *EntryAdapter) XXX_Size() int
func (*EntryAdapter) XXX_Unmarshal ¶
func (m *EntryAdapter) XXX_Unmarshal(b []byte) error
type LabelAdapter ¶
type LabelAdapter struct {
Name, Value string
}
LabelAdapter should be a copy of the Prometheus labels.Label type. We cannot import Prometheus in this package because it would create many dependencies in other projects importing this package. Instead, we copy the definition here, which should be kept in sync with the original, so it can be cast to the prometheus type.
func (*LabelAdapter) Compare ¶
func (m *LabelAdapter) Compare(other LabelAdapter) int
Compare implements proto.Comparer.
func (*LabelAdapter) Equal ¶
func (m *LabelAdapter) Equal(other LabelAdapter) bool
Equal implements proto.Equaler.
func (*LabelAdapter) Marshal ¶
func (m *LabelAdapter) Marshal() (dAtA []byte, err error)
func (*LabelAdapter) MarshalToSizedBuffer ¶
func (m *LabelAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LabelAdapter) Size ¶
func (m *LabelAdapter) Size() (n int)
func (*LabelAdapter) Unmarshal ¶
func (m *LabelAdapter) Unmarshal(dAtA []byte) error
Unmarshal a LabelAdapter, implements proto.Unmarshaller.
type LabelPairAdapter ¶
type LabelPairAdapter struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
func (*LabelPairAdapter) Descriptor ¶
func (*LabelPairAdapter) Descriptor() ([]byte, []int)
func (*LabelPairAdapter) Equal ¶
func (this *LabelPairAdapter) Equal(that interface{}) bool
func (*LabelPairAdapter) GetName ¶
func (m *LabelPairAdapter) GetName() string
func (*LabelPairAdapter) GetValue ¶
func (m *LabelPairAdapter) GetValue() string
func (*LabelPairAdapter) GoString ¶
func (this *LabelPairAdapter) GoString() string
func (*LabelPairAdapter) Marshal ¶
func (m *LabelPairAdapter) Marshal() (dAtA []byte, err error)
func (*LabelPairAdapter) MarshalToSizedBuffer ¶
func (m *LabelPairAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LabelPairAdapter) ProtoMessage ¶
func (*LabelPairAdapter) ProtoMessage()
func (*LabelPairAdapter) Reset ¶
func (m *LabelPairAdapter) Reset()
func (*LabelPairAdapter) Size ¶
func (m *LabelPairAdapter) Size() (n int)
func (*LabelPairAdapter) String ¶
func (this *LabelPairAdapter) String() string
func (*LabelPairAdapter) Unmarshal ¶
func (m *LabelPairAdapter) Unmarshal(dAtA []byte) error
func (*LabelPairAdapter) XXX_DiscardUnknown ¶
func (m *LabelPairAdapter) XXX_DiscardUnknown()
func (*LabelPairAdapter) XXX_Marshal ¶
func (m *LabelPairAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LabelPairAdapter) XXX_Merge ¶
func (m *LabelPairAdapter) XXX_Merge(src proto.Message)
func (*LabelPairAdapter) XXX_Size ¶
func (m *LabelPairAdapter) XXX_Size() int
func (*LabelPairAdapter) XXX_Unmarshal ¶
func (m *LabelPairAdapter) XXX_Unmarshal(b []byte) error
type LabelsAdapter ¶
type LabelsAdapter []LabelAdapter
LabelsAdapter is equivalent to the Prometheus labels.Labels type.
func (LabelsAdapter) MarshalJSON ¶
func (ls LabelsAdapter) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Should be kept in sync with Prometheus's labels.Labels implementation.
func (*LabelsAdapter) UnmarshalJSON ¶
func (ls *LabelsAdapter) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler. Should be kept in sync with Prometheus's labels.Labels implementation.
type PushRequest ¶
type PushRequest struct {
Streams []Stream `protobuf:"bytes,1,rep,name=streams,proto3,customtype=Stream" json:"streams"`
}
func (*PushRequest) Descriptor ¶
func (*PushRequest) Descriptor() ([]byte, []int)
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) MarshalToSizedBuffer ¶
func (m *PushRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
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
func (*PushRequest) XXX_DiscardUnknown ¶
func (m *PushRequest) XXX_DiscardUnknown()
func (*PushRequest) XXX_Marshal ¶
func (m *PushRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushRequest) XXX_Merge ¶
func (m *PushRequest) XXX_Merge(src proto.Message)
func (*PushRequest) XXX_Size ¶
func (m *PushRequest) XXX_Size() int
func (*PushRequest) XXX_Unmarshal ¶
func (m *PushRequest) XXX_Unmarshal(b []byte) error
type PushResponse ¶
type PushResponse struct { }
func (*PushResponse) Descriptor ¶
func (*PushResponse) Descriptor() ([]byte, []int)
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) MarshalToSizedBuffer ¶
func (m *PushResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PushResponse) ProtoMessage ¶
func (*PushResponse) ProtoMessage()
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
func (*PushResponse) XXX_DiscardUnknown ¶
func (m *PushResponse) XXX_DiscardUnknown()
func (*PushResponse) XXX_Marshal ¶
func (m *PushResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PushResponse) XXX_Merge ¶
func (m *PushResponse) XXX_Merge(src proto.Message)
func (*PushResponse) XXX_Size ¶
func (m *PushResponse) XXX_Size() int
func (*PushResponse) XXX_Unmarshal ¶
func (m *PushResponse) XXX_Unmarshal(b []byte) error
type PusherClient ¶
type PusherClient interface {
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
}
PusherClient is the client API for Pusher service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPusherClient ¶
func NewPusherClient(cc *grpc.ClientConn) PusherClient
type PusherRF1Client ¶
type PusherRF1Client interface {
Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushResponse, error)
}
PusherRF1Client is the client API for PusherRF1 service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPusherRF1Client ¶
func NewPusherRF1Client(cc *grpc.ClientConn) PusherRF1Client
type PusherRF1Server ¶
type PusherRF1Server interface {
Push(context.Context, *PushRequest) (*PushResponse, error)
}
PusherRF1Server is the server API for PusherRF1 service.
type PusherServer ¶
type PusherServer interface {
Push(context.Context, *PushRequest) (*PushResponse, error)
}
PusherServer is the server API for Pusher service.
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) MarshalJSON ¶
MarshalJSON implements json.Marshaler. In Loki, this method should only be used by the Legacy encoder used when hitting the deprecated /api/promt/query endpoint. We will ignore the categorized labels and only return the stream labels.
func (*Stream) MarshalToSizedBuffer ¶
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) Descriptor ¶
func (*StreamAdapter) Descriptor() ([]byte, []int)
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) MarshalToSizedBuffer ¶
func (m *StreamAdapter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StreamAdapter) ProtoMessage ¶
func (*StreamAdapter) ProtoMessage()
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
func (*StreamAdapter) XXX_DiscardUnknown ¶
func (m *StreamAdapter) XXX_DiscardUnknown()
func (*StreamAdapter) XXX_Marshal ¶
func (m *StreamAdapter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamAdapter) XXX_Merge ¶
func (m *StreamAdapter) XXX_Merge(src proto.Message)
func (*StreamAdapter) XXX_Size ¶
func (m *StreamAdapter) XXX_Size() int
func (*StreamAdapter) XXX_Unmarshal ¶
func (m *StreamAdapter) XXX_Unmarshal(b []byte) error
type UnimplementedPusherRF1Server ¶
type UnimplementedPusherRF1Server struct { }
UnimplementedPusherRF1Server can be embedded to have forward compatible implementations.
func (*UnimplementedPusherRF1Server) Push ¶
func (*UnimplementedPusherRF1Server) Push(ctx context.Context, req *PushRequest) (*PushResponse, error)
type UnimplementedPusherServer ¶
type UnimplementedPusherServer struct { }
UnimplementedPusherServer can be embedded to have forward compatible implementations.
func (*UnimplementedPusherServer) Push ¶
func (*UnimplementedPusherServer) Push(ctx context.Context, req *PushRequest) (*PushResponse, error)