loki

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Timestamp            *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Line                 string               `protobuf:"bytes,2,opt,name=line,proto3" json:"line,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Entry) Descriptor

func (*Entry) Descriptor() ([]byte, []int)

func (*Entry) GetLine

func (m *Entry) GetLine() string

func (*Entry) GetTimestamp

func (m *Entry) GetTimestamp() *timestamp.Timestamp

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

func (*Entry) XXX_DiscardUnknown

func (m *Entry) XXX_DiscardUnknown()

func (*Entry) XXX_Marshal

func (m *Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entry) XXX_Merge

func (m *Entry) XXX_Merge(src proto.Message)

func (*Entry) XXX_Size

func (m *Entry) XXX_Size() int

func (*Entry) XXX_Unmarshal

func (m *Entry) XXX_Unmarshal(b []byte) error

type Loki

type Loki struct {
	LokiURL   string
	BatchWait time.Duration
	BatchSize int
	// contains filtered or unexported fields
}

func NewLoki

func NewLoki(URL string, batchSize, batchWait int) (*Loki, error)

func (*Loki) AddData

func (l *Loki) AddData(key, value string)

func (*Loki) Close

func (l *Loki) Close()

func (*Loki) Fire

func (l *Loki) Fire(entry *logrus.Entry) error

func (*Loki) Levels

func (l *Loki) Levels() []logrus.Level

type PushRequest

type PushRequest struct {
	Streams              []*Stream `protobuf:"bytes,1,rep,name=streams,proto3" json:"streams,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*PushRequest) Descriptor

func (*PushRequest) Descriptor() ([]byte, []int)

func (*PushRequest) GetStreams

func (m *PushRequest) GetStreams() []*Stream

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) Reset

func (m *PushRequest) Reset()

func (*PushRequest) String

func (m *PushRequest) String() string

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 Stream

type Stream struct {
	Labels               string   `protobuf:"bytes,1,opt,name=labels,proto3" json:"labels,omitempty"`
	Entries              []*Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Stream) Descriptor

func (*Stream) Descriptor() ([]byte, []int)

func (*Stream) GetEntries

func (m *Stream) GetEntries() []*Entry

func (*Stream) GetLabels

func (m *Stream) GetLabels() string

func (*Stream) ProtoMessage

func (*Stream) ProtoMessage()

func (*Stream) Reset

func (m *Stream) Reset()

func (*Stream) String

func (m *Stream) String() string

func (*Stream) XXX_DiscardUnknown

func (m *Stream) XXX_DiscardUnknown()

func (*Stream) XXX_Marshal

func (m *Stream) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Stream) XXX_Merge

func (m *Stream) XXX_Merge(src proto.Message)

func (*Stream) XXX_Size

func (m *Stream) XXX_Size() int

func (*Stream) XXX_Unmarshal

func (m *Stream) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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