logproto

package
v0.0.0-test.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthLogproto        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowLogproto          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupLogproto = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterPusherServer

func RegisterPusherServer(s *grpc.Server, srv PusherServer)

func SizeOfStdTime

func SizeOfStdTime(t time.Time) int

func StdTimeMarshalTo

func StdTimeMarshalTo(t time.Time, data []byte) (int, error)

func StdTimeUnmarshal

func StdTimeUnmarshal(t *time.Time, data []byte) error

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

func (*Entry) Marshal

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

func (*Entry) MarshalTo

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

func (*Entry) MarshalToSizedBuffer

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

func (*Entry) Size

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

func (*Entry) Unmarshal

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

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) 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) 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) 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 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) MarshalTo

func (m *PushRequest) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *PushResponse) MarshalTo(dAtA []byte) (int, 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 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) Equal

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

func (*Stream) Marshal

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

func (*Stream) MarshalTo

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

func (*Stream) MarshalToSizedBuffer

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

func (*Stream) Size

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

func (*Stream) Unmarshal

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

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) MarshalTo

func (m *StreamAdapter) MarshalTo(dAtA []byte) (int, 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 Streams

type Streams []Stream

func (Streams) Len

func (xs Streams) Len() int

func (Streams) Less

func (xs Streams) Less(i, j int) bool

func (Streams) Swap

func (xs Streams) Swap(i, j int)

type UnimplementedPusherServer

type UnimplementedPusherServer struct {
}

UnimplementedPusherServer can be embedded to have forward compatible implementations.

func (*UnimplementedPusherServer) Push

Jump to

Keyboard shortcuts

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