luci: go.chromium.org/luci/logdog/api/logpb Index | Files

package logpb

import "go.chromium.org/luci/logdog/api/logpb"

Package logpb contains LogDog protobuf source and generated protobuf data.

The package name here must match the protobuf package name, as the generated files will reside in the same directory.

Index

Package Files

butler.pb.go generate.go log.pb.go utils.go version.go

Constants

const Version = "1"

Version is the protocol version number. This number should be incremented when a non-backwards-compatible change is made to LogDog protobufs.

Variables

var ButlerMetadata_Compression_name = map[int32]string{
    0:  "NONE",
    1:  "ZLIB",
}
var ButlerMetadata_Compression_value = map[string]int32{
    "NONE": 0,
    "ZLIB": 1,
}
var ButlerMetadata_ContentType_name = map[int32]string{
    0:  "Invalid",
    1:  "ButlerLogBundle",
}
var ButlerMetadata_ContentType_value = map[string]int32{
    "Invalid":         0,
    "ButlerLogBundle": 1,
}
var (
    // ErrNoContent indicates that a LogEntry has no data content.
    ErrNoContent = errors.New("no content")
)
var StreamType_name = map[int32]string{
    0:  "TEXT",
    1:  "BINARY",
    2:  "DATAGRAM",
}
var StreamType_value = map[string]int32{
    "TEXT":     0,
    "BINARY":   1,
    "DATAGRAM": 2,
}

type Binary Uses

type Binary struct {
    // The binary stream's data.
    Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Binary stream content.

func (*Binary) Descriptor Uses

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

func (*Binary) GetData Uses

func (m *Binary) GetData() []byte

func (*Binary) ProtoMessage Uses

func (*Binary) ProtoMessage()

func (*Binary) Reset Uses

func (m *Binary) Reset()

func (*Binary) String Uses

func (m *Binary) String() string

func (*Binary) XXX_DiscardUnknown Uses

func (m *Binary) XXX_DiscardUnknown()

func (*Binary) XXX_Marshal Uses

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

func (*Binary) XXX_Merge Uses

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

func (*Binary) XXX_Size Uses

func (m *Binary) XXX_Size() int

func (*Binary) XXX_Unmarshal Uses

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

type ButlerLogBundle Uses

type ButlerLogBundle struct {
    //
    // (DEPRECATED) Stream source information. Now supplied during prefix
    // registration.
    DeprecatedSource string `protobuf:"bytes,1,opt,name=deprecated_source,json=deprecatedSource,proto3" json:"deprecated_source,omitempty"`
    // The timestamp when this bundle was generated.
    //
    // This field will be used for debugging and internal accounting.
    Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
    // *
    // Each Entry is an individual set of log records for a given log stream.
    Entries []*ButlerLogBundle_Entry `protobuf:"bytes,3,rep,name=entries,proto3" json:"entries,omitempty"`
    // * Project specifies which luci-config project this stream belongs to.
    Project string `protobuf:"bytes,4,opt,name=project,proto3" json:"project,omitempty"`
    // *
    // The log stream prefix that is shared by all bundled streams.
    //
    // This prefix is valid within the supplied project scope.
    Prefix string `protobuf:"bytes,5,opt,name=prefix,proto3" json:"prefix,omitempty"`
    //
    // The log prefix's secret value (required).
    //
    // The secret is bound to all log streams that share the supplied Prefix, and
    // The Coordinator will record the secret associated with a given log Prefix,
    // but will not expose the secret to users.
    //
    // The Collector will check the secret prior to ingesting logs. If the
    // secret doesn't match the value recorded by the Coordinator, the log
    // will be discarded.
    //
    // This ensures that only the Butler instance that generated the log stream
    // can emit log data for that stream. It also ensures that only authenticated
    // users can write to a Prefix.
    Secret               []byte   `protobuf:"bytes,6,opt,name=secret,proto3" json:"secret,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

A message containing log data in transit from the Butler.

The Butler is capable of conserving bandwidth by bundling collected log messages together into this protocol buffer. Based on Butler bundling settings, this message can represent anything from a single LogRecord to multiple LogRecords belonging to several different streams.

Entries in a Log Bundle are fully self-descriptive: no additional information is needed to fully associate the contained data with its proper place in the source log stream.

func (*ButlerLogBundle) Descriptor Uses

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

func (*ButlerLogBundle) GetDeprecatedSource Uses

func (m *ButlerLogBundle) GetDeprecatedSource() string

func (*ButlerLogBundle) GetEntries Uses

func (m *ButlerLogBundle) GetEntries() []*ButlerLogBundle_Entry

func (*ButlerLogBundle) GetPrefix Uses

func (m *ButlerLogBundle) GetPrefix() string

func (*ButlerLogBundle) GetProject Uses

func (m *ButlerLogBundle) GetProject() string

func (*ButlerLogBundle) GetSecret Uses

func (m *ButlerLogBundle) GetSecret() []byte

func (*ButlerLogBundle) GetTimestamp Uses

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

func (*ButlerLogBundle) ProtoMessage Uses

func (*ButlerLogBundle) ProtoMessage()

func (*ButlerLogBundle) Reset Uses

func (m *ButlerLogBundle) Reset()

func (*ButlerLogBundle) String Uses

func (m *ButlerLogBundle) String() string

func (*ButlerLogBundle) XXX_DiscardUnknown Uses

func (m *ButlerLogBundle) XXX_DiscardUnknown()

func (*ButlerLogBundle) XXX_Marshal Uses

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

func (*ButlerLogBundle) XXX_Merge Uses

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

func (*ButlerLogBundle) XXX_Size Uses

func (m *ButlerLogBundle) XXX_Size() int

func (*ButlerLogBundle) XXX_Unmarshal Uses

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

type ButlerLogBundle_Entry Uses

type ButlerLogBundle_Entry struct {
    //
    // The descriptor for this entry's log stream.
    //
    // Each LogEntry in the "logs" field is shares this common descriptor.
    Desc *LogStreamDescriptor `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
    // (DEPRECATED) Per-entry secret replaced with Butler-wide secret.
    DeprecatedEntrySecret []byte `protobuf:"bytes,2,opt,name=deprecated_entry_secret,json=deprecatedEntrySecret,proto3" json:"deprecated_entry_secret,omitempty"`
    //
    // Whether this log entry terminates its stream.
    //
    // If present and "true", this field declares that this Entry is the last
    // such entry in the stream. This fact is recorded by the Collector and
    // registered with the Coordinator. The largest stream prefix in this Entry
    // will be bound the stream's LogEntry records to [0:largest_prefix]. Once
    // all messages in that range have been received, the log may be archived.
    //
    // Further log entries belonging to this stream with stream indices
    // exceeding the terminal log's index will be discarded.
    Terminal bool `protobuf:"varint,3,opt,name=terminal,proto3" json:"terminal,omitempty"`
    //
    // If terminal is true, this is the terminal stream index; that is, the last
    // message index in the stream.
    TerminalIndex uint64 `protobuf:"varint,4,opt,name=terminal_index,json=terminalIndex,proto3" json:"terminal_index,omitempty"`
    //
    // Log entries attached to this record. These MUST be sequential.
    //
    // This is the main log entry content.
    Logs                 []*LogEntry `protobuf:"bytes,5,rep,name=logs,proto3" json:"logs,omitempty"`
    XXX_NoUnkeyedLiteral struct{}    `json:"-"`
    XXX_unrecognized     []byte      `json:"-"`
    XXX_sizecache        int32       `json:"-"`
}

A bundle Entry describes a set of LogEntry messages originating from the same log stream.

func (*ButlerLogBundle_Entry) Descriptor Uses

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

func (*ButlerLogBundle_Entry) GetDeprecatedEntrySecret Uses

func (m *ButlerLogBundle_Entry) GetDeprecatedEntrySecret() []byte

func (*ButlerLogBundle_Entry) GetDesc Uses

func (m *ButlerLogBundle_Entry) GetDesc() *LogStreamDescriptor

func (*ButlerLogBundle_Entry) GetLogs Uses

func (m *ButlerLogBundle_Entry) GetLogs() []*LogEntry

func (*ButlerLogBundle_Entry) GetTerminal Uses

func (m *ButlerLogBundle_Entry) GetTerminal() bool

func (*ButlerLogBundle_Entry) GetTerminalIndex Uses

func (m *ButlerLogBundle_Entry) GetTerminalIndex() uint64

func (*ButlerLogBundle_Entry) ProtoMessage Uses

func (*ButlerLogBundle_Entry) ProtoMessage()

func (*ButlerLogBundle_Entry) Reset Uses

func (m *ButlerLogBundle_Entry) Reset()

func (*ButlerLogBundle_Entry) String Uses

func (m *ButlerLogBundle_Entry) String() string

func (*ButlerLogBundle_Entry) XXX_DiscardUnknown Uses

func (m *ButlerLogBundle_Entry) XXX_DiscardUnknown()

func (*ButlerLogBundle_Entry) XXX_Marshal Uses

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

func (*ButlerLogBundle_Entry) XXX_Merge Uses

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

func (*ButlerLogBundle_Entry) XXX_Size Uses

func (m *ButlerLogBundle_Entry) XXX_Size() int

func (*ButlerLogBundle_Entry) XXX_Unmarshal Uses

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

type ButlerMetadata Uses

type ButlerMetadata struct {
    // This is the type of data in the subsequent frame.
    Type        ButlerMetadata_ContentType `protobuf:"varint,1,opt,name=type,proto3,enum=logpb.ButlerMetadata_ContentType" json:"type,omitempty"`
    Compression ButlerMetadata_Compression `protobuf:"varint,2,opt,name=compression,proto3,enum=logpb.ButlerMetadata_Compression" json:"compression,omitempty"`
    // The protobuf version string (see version.go).
    ProtoVersion         string   `protobuf:"bytes,3,opt,name=proto_version,json=protoVersion,proto3" json:"proto_version,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

ButlerMetadata appears as a frame at the beginning of Butler published data to describe the remainder of the contents.

func (*ButlerMetadata) Descriptor Uses

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

func (*ButlerMetadata) GetCompression Uses

func (m *ButlerMetadata) GetCompression() ButlerMetadata_Compression

func (*ButlerMetadata) GetProtoVersion Uses

func (m *ButlerMetadata) GetProtoVersion() string

func (*ButlerMetadata) GetType Uses

func (m *ButlerMetadata) GetType() ButlerMetadata_ContentType

func (*ButlerMetadata) ProtoMessage Uses

func (*ButlerMetadata) ProtoMessage()

func (*ButlerMetadata) Reset Uses

func (m *ButlerMetadata) Reset()

func (*ButlerMetadata) String Uses

func (m *ButlerMetadata) String() string

func (*ButlerMetadata) XXX_DiscardUnknown Uses

func (m *ButlerMetadata) XXX_DiscardUnknown()

func (*ButlerMetadata) XXX_Marshal Uses

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

func (*ButlerMetadata) XXX_Merge Uses

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

func (*ButlerMetadata) XXX_Size Uses

func (m *ButlerMetadata) XXX_Size() int

func (*ButlerMetadata) XXX_Unmarshal Uses

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

type ButlerMetadata_Compression Uses

type ButlerMetadata_Compression int32

Compression scheme of attached data.

const (
    ButlerMetadata_NONE ButlerMetadata_Compression = 0
    ButlerMetadata_ZLIB ButlerMetadata_Compression = 1
)

func (ButlerMetadata_Compression) EnumDescriptor Uses

func (ButlerMetadata_Compression) EnumDescriptor() ([]byte, []int)

func (ButlerMetadata_Compression) String Uses

func (x ButlerMetadata_Compression) String() string

type ButlerMetadata_ContentType Uses

type ButlerMetadata_ContentType int32

This enumerates the possible contents of published Butler data.

const (
    // An invalid content type. Do not use.
    ButlerMetadata_Invalid ButlerMetadata_ContentType = 0
    // The published data is a ButlerLogBundle protobuf message.
    ButlerMetadata_ButlerLogBundle ButlerMetadata_ContentType = 1
)

func (ButlerMetadata_ContentType) EnumDescriptor Uses

func (ButlerMetadata_ContentType) EnumDescriptor() ([]byte, []int)

func (ButlerMetadata_ContentType) String Uses

func (x ButlerMetadata_ContentType) String() string

type Datagram Uses

type Datagram struct {
    // This datagram data.
    Data                 []byte            `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
    Partial              *Datagram_Partial `protobuf:"bytes,2,opt,name=partial,proto3" json:"partial,omitempty"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

Datagram stream content type.

func (*Datagram) Descriptor Uses

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

func (*Datagram) GetData Uses

func (m *Datagram) GetData() []byte

func (*Datagram) GetPartial Uses

func (m *Datagram) GetPartial() *Datagram_Partial

func (*Datagram) ProtoMessage Uses

func (*Datagram) ProtoMessage()

func (*Datagram) Reset Uses

func (m *Datagram) Reset()

func (*Datagram) String Uses

func (m *Datagram) String() string

func (*Datagram) XXX_DiscardUnknown Uses

func (m *Datagram) XXX_DiscardUnknown()

func (*Datagram) XXX_Marshal Uses

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

func (*Datagram) XXX_Merge Uses

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

func (*Datagram) XXX_Size Uses

func (m *Datagram) XXX_Size() int

func (*Datagram) XXX_Unmarshal Uses

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

type Datagram_Partial Uses

type Datagram_Partial struct {
    //
    // The index, starting with zero, of this datagram fragment in the full
    // datagram.
    Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
    // The size of the full datagram
    Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
    // If true, this is the last partial datagram in the overall datagram.
    Last                 bool     `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

If this is not a partial datagram, this field will include reassembly and state details for the full datagram.

func (*Datagram_Partial) Descriptor Uses

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

func (*Datagram_Partial) GetIndex Uses

func (m *Datagram_Partial) GetIndex() uint32

func (*Datagram_Partial) GetLast Uses

func (m *Datagram_Partial) GetLast() bool

func (*Datagram_Partial) GetSize Uses

func (m *Datagram_Partial) GetSize() uint64

func (*Datagram_Partial) ProtoMessage Uses

func (*Datagram_Partial) ProtoMessage()

func (*Datagram_Partial) Reset Uses

func (m *Datagram_Partial) Reset()

func (*Datagram_Partial) String Uses

func (m *Datagram_Partial) String() string

func (*Datagram_Partial) XXX_DiscardUnknown Uses

func (m *Datagram_Partial) XXX_DiscardUnknown()

func (*Datagram_Partial) XXX_Marshal Uses

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

func (*Datagram_Partial) XXX_Merge Uses

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

func (*Datagram_Partial) XXX_Size Uses

func (m *Datagram_Partial) XXX_Size() int

func (*Datagram_Partial) XXX_Unmarshal Uses

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

type LogEntry Uses

type LogEntry struct {
    //
    // The stream time offset for this content.
    //
    // This offset is added to the log stream's base "timestamp" to resolve the
    // timestamp for this specific Content.
    TimeOffset *duration.Duration `protobuf:"bytes,1,opt,name=time_offset,json=timeOffset,proto3" json:"time_offset,omitempty"`
    //
    // The message index within the Prefix (required).
    //
    // This is value is unique to this LogEntry across the entire set of entries
    // sharing the stream's Prefix. It is used to designate unambiguous log
    // ordering.
    PrefixIndex uint64 `protobuf:"varint,2,opt,name=prefix_index,json=prefixIndex,proto3" json:"prefix_index,omitempty"`
    //
    // The message index within its Stream (required).
    //
    // This value is unique across all entries sharing the same Prefix and Stream
    // Name. It is used to designate unambiguous log ordering within the stream.
    StreamIndex uint64 `protobuf:"varint,3,opt,name=stream_index,json=streamIndex,proto3" json:"stream_index,omitempty"`
    //
    // The sequence number of the first content entry in this LogEntry.
    //
    // Text: This is the line index of the first included line. Line indices begin
    //     at zero.
    // Binary: This is the byte offset of the first byte in the included data.
    // Datagram: This is the index of the datagram. The first datagram has index
    //     zero.
    Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"`
    //
    // The content of the message. The field that is populated here must
    // match the log's `stream_type`.
    //
    // Types that are valid to be assigned to Content:
    //	*LogEntry_Text
    //	*LogEntry_Binary
    //	*LogEntry_Datagram
    Content              isLogEntry_Content `protobuf_oneof:"content"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

* An individual log entry.

This contains the superset of transmissible log data. Its content fields should be interpreted in the context of the log stream's content type.

func (*LogEntry) Descriptor Uses

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

func (*LogEntry) GetBinary Uses

func (m *LogEntry) GetBinary() *Binary

func (*LogEntry) GetContent Uses

func (m *LogEntry) GetContent() isLogEntry_Content

func (*LogEntry) GetDatagram Uses

func (m *LogEntry) GetDatagram() *Datagram

func (*LogEntry) GetPrefixIndex Uses

func (m *LogEntry) GetPrefixIndex() uint64

func (*LogEntry) GetSequence Uses

func (m *LogEntry) GetSequence() uint64

func (*LogEntry) GetStreamIndex Uses

func (m *LogEntry) GetStreamIndex() uint64

func (*LogEntry) GetText Uses

func (m *LogEntry) GetText() *Text

func (*LogEntry) GetTimeOffset Uses

func (m *LogEntry) GetTimeOffset() *duration.Duration

func (*LogEntry) ProtoMessage Uses

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset Uses

func (m *LogEntry) Reset()

func (*LogEntry) String Uses

func (m *LogEntry) String() string

func (*LogEntry) Validate Uses

func (e *LogEntry) Validate(d *LogStreamDescriptor) error

Validate checks a supplied LogEntry against its LogStreamDescriptor for validity, returning an error if it is not valid.

If the LogEntry is otherwise valid, but has no content, ErrNoContent will be returned.

func (*LogEntry) XXX_DiscardUnknown Uses

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal Uses

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

func (*LogEntry) XXX_Merge Uses

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

func (*LogEntry) XXX_OneofFuncs Uses

func (*LogEntry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*LogEntry) XXX_Size Uses

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal Uses

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

type LogEntry_Binary Uses

type LogEntry_Binary struct {
    Binary *Binary `protobuf:"bytes,11,opt,name=binary,proto3,oneof"`
}

type LogEntry_Datagram Uses

type LogEntry_Datagram struct {
    Datagram *Datagram `protobuf:"bytes,12,opt,name=datagram,proto3,oneof"`
}

type LogEntry_Text Uses

type LogEntry_Text struct {
    Text *Text `protobuf:"bytes,10,opt,name=text,proto3,oneof"`
}

type LogIndex Uses

type LogIndex struct {
    //
    // The LogStreamDescriptor for this log stream (required).
    //
    // The index stores the stream's LogStreamDescriptor so that a client can
    // know the full set of log metadata by downloading its index.
    Desc *LogStreamDescriptor `protobuf:"bytes,1,opt,name=desc,proto3" json:"desc,omitempty"`
    //
    // A series of ascending-ordered Entry messages representing snapshots of an
    // archived log stream.
    //
    // Within this set of Entry messages, the "offset", "prefix_index",
    // "stream_index", and "time_offset" fields will be ascending.
    //
    // The frequency of Entry messages is not defined; it is up to the Archivist
    // process to choose a frequency.
    Entries []*LogIndex_Entry `protobuf:"bytes,2,rep,name=entries,proto3" json:"entries,omitempty"`
    // *
    // The last prefix index in the log stream.
    //
    // This is optional. If zero, there is either no information about the last
    // prefix index, or there are zero entries in the prefix.
    LastPrefixIndex uint64 `protobuf:"varint,3,opt,name=last_prefix_index,json=lastPrefixIndex,proto3" json:"last_prefix_index,omitempty"`
    // *
    // The last stream index in the log stream.
    //
    // This is optional. If zero, there is either no information about the last
    // stream index, or there are zero entries in the stream.
    LastStreamIndex uint64 `protobuf:"varint,4,opt,name=last_stream_index,json=lastStreamIndex,proto3" json:"last_stream_index,omitempty"`
    // *
    // The number of log entries in the stream.
    //
    // This is optional. If zero, there is either no information about the number
    // of log entries, or there are zero entries in the stream.
    LogEntryCount        uint64   `protobuf:"varint,5,opt,name=log_entry_count,json=logEntryCount,proto3" json:"log_entry_count,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

* LogIndex is an index into an at-rest log storage.

The log stream and log index are generated by the Archivist during archival.

An archived log stream is a series of contiguous LogEntry frames. The index maps a log's logical logation in its stream, prefix, and timeline to its frame's binary offset in the archived log stream blob.

func (*LogIndex) Descriptor Uses

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

func (*LogIndex) GetDesc Uses

func (m *LogIndex) GetDesc() *LogStreamDescriptor

func (*LogIndex) GetEntries Uses

func (m *LogIndex) GetEntries() []*LogIndex_Entry

func (*LogIndex) GetLastPrefixIndex Uses

func (m *LogIndex) GetLastPrefixIndex() uint64

func (*LogIndex) GetLastStreamIndex Uses

func (m *LogIndex) GetLastStreamIndex() uint64

func (*LogIndex) GetLogEntryCount Uses

func (m *LogIndex) GetLogEntryCount() uint64

func (*LogIndex) ProtoMessage Uses

func (*LogIndex) ProtoMessage()

func (*LogIndex) Reset Uses

func (m *LogIndex) Reset()

func (*LogIndex) String Uses

func (m *LogIndex) String() string

func (*LogIndex) XXX_DiscardUnknown Uses

func (m *LogIndex) XXX_DiscardUnknown()

func (*LogIndex) XXX_Marshal Uses

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

func (*LogIndex) XXX_Merge Uses

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

func (*LogIndex) XXX_Size Uses

func (m *LogIndex) XXX_Size() int

func (*LogIndex) XXX_Unmarshal Uses

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

type LogIndex_Entry Uses

type LogIndex_Entry struct {
    //
    // The byte offset in the emitted log stream of the RecordIO entry for the
    // LogEntry corresponding to this Entry.
    Offset uint64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
    //
    // The sequence number of the first content entry.
    //
    // Text: This is the line index of the first included line. Line indices
    //     begin at zero.
    // Binary: This is the byte offset of the first byte in the included data.
    // Datagram: This is the index of the datagram. The first datagram has index
    //     zero.
    Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
    //
    // The log index that this entry describes (required).
    //
    // This is used by clients to identify a specific LogEntry within a set of
    // streams sharing a Prefix.
    PrefixIndex uint64 `protobuf:"varint,3,opt,name=prefix_index,json=prefixIndex,proto3" json:"prefix_index,omitempty"`
    //
    // The time offset of this log entry (required).
    //
    // This is used by clients to identify a specific LogEntry within a log
    // stream.
    StreamIndex uint64 `protobuf:"varint,4,opt,name=stream_index,json=streamIndex,proto3" json:"stream_index,omitempty"`
    //
    // The time offset of this log entry, in microseconds.
    //
    // This is added to the descriptor's "timestamp" field to identify the
    // specific timestamp of this log. It is used by clients to identify a
    // specific LogEntry by time.
    TimeOffset           *duration.Duration `protobuf:"bytes,5,opt,name=time_offset,json=timeOffset,proto3" json:"time_offset,omitempty"`
    XXX_NoUnkeyedLiteral struct{}           `json:"-"`
    XXX_unrecognized     []byte             `json:"-"`
    XXX_sizecache        int32              `json:"-"`
}

Entry is a single index entry.

The index is composed of a series of entries, each corresponding to a sequential snapshot of of the log stream.

func (*LogIndex_Entry) Descriptor Uses

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

func (*LogIndex_Entry) GetOffset Uses

func (m *LogIndex_Entry) GetOffset() uint64

func (*LogIndex_Entry) GetPrefixIndex Uses

func (m *LogIndex_Entry) GetPrefixIndex() uint64

func (*LogIndex_Entry) GetSequence Uses

func (m *LogIndex_Entry) GetSequence() uint64

func (*LogIndex_Entry) GetStreamIndex Uses

func (m *LogIndex_Entry) GetStreamIndex() uint64

func (*LogIndex_Entry) GetTimeOffset Uses

func (m *LogIndex_Entry) GetTimeOffset() *duration.Duration

func (*LogIndex_Entry) ProtoMessage Uses

func (*LogIndex_Entry) ProtoMessage()

func (*LogIndex_Entry) Reset Uses

func (m *LogIndex_Entry) Reset()

func (*LogIndex_Entry) String Uses

func (m *LogIndex_Entry) String() string

func (*LogIndex_Entry) XXX_DiscardUnknown Uses

func (m *LogIndex_Entry) XXX_DiscardUnknown()

func (*LogIndex_Entry) XXX_Marshal Uses

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

func (*LogIndex_Entry) XXX_Merge Uses

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

func (*LogIndex_Entry) XXX_Size Uses

func (m *LogIndex_Entry) XXX_Size() int

func (*LogIndex_Entry) XXX_Unmarshal Uses

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

type LogStreamDescriptor Uses

type LogStreamDescriptor struct {
    //
    // The stream's prefix (required).
    //
    // Logs originating from the same Butler instance will share a Prefix.
    //
    // A valid prefix value is a StreamName described in:
    // https://go.chromium.org/luci/common/logdog/types
    Prefix string `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
    //
    // The log stream's name (required).
    //
    // This is used to uniquely identify a log stream within the scope of its
    // prefix.
    //
    // A valid name value is a StreamName described in:
    // https://go.chromium.org/luci/common/logdog/types
    Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
    // The log stream's content type (required).
    StreamType StreamType `protobuf:"varint,3,opt,name=stream_type,json=streamType,proto3,enum=logpb.StreamType" json:"stream_type,omitempty"`
    //
    // The stream's content type (required).
    //
    // This must be an HTTP Content-Type value. It is made available to LogDog
    // clients when querying stream metadata. It will also be applied to archived
    // binary log data.
    ContentType string `protobuf:"bytes,4,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
    //
    // The log stream's base timestamp (required).
    //
    // This notes the start time of the log stream. All LogEntries express their
    // timestamp as microsecond offsets from this field.
    Timestamp *timestamp.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
    //
    // Tag is an arbitrary key/value tag associated with this log stream.
    //
    // LogDog clients can query for log streams based on tag values.
    Tags map[string]string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    //
    // If set, the stream will be joined together during archival to recreate the
    // original stream and made available at <prefix>/+/<name>.ext.
    BinaryFileExt        string   `protobuf:"bytes,7,opt,name=binary_file_ext,json=binaryFileExt,proto3" json:"binary_file_ext,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

* Log stream descriptor data. This is the full set of information that describes a logging stream.

func (*LogStreamDescriptor) Descriptor Uses

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

func (*LogStreamDescriptor) Equal Uses

func (d *LogStreamDescriptor) Equal(o *LogStreamDescriptor) bool

Equal tests if two LogStreamDescriptor instances have the same data.

func (*LogStreamDescriptor) GetBinaryFileExt Uses

func (m *LogStreamDescriptor) GetBinaryFileExt() string

func (*LogStreamDescriptor) GetContentType Uses

func (m *LogStreamDescriptor) GetContentType() string

func (*LogStreamDescriptor) GetName Uses

func (m *LogStreamDescriptor) GetName() string

func (*LogStreamDescriptor) GetPrefix Uses

func (m *LogStreamDescriptor) GetPrefix() string

func (*LogStreamDescriptor) GetStreamType Uses

func (m *LogStreamDescriptor) GetStreamType() StreamType

func (*LogStreamDescriptor) GetTags Uses

func (m *LogStreamDescriptor) GetTags() map[string]string

func (*LogStreamDescriptor) GetTimestamp Uses

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

func (*LogStreamDescriptor) Path Uses

func (d *LogStreamDescriptor) Path() types.StreamPath

Path returns a types.StreamPath constructed from the LogStreamDesciptor's Prefix and Name fields.

func (*LogStreamDescriptor) ProtoMessage Uses

func (*LogStreamDescriptor) ProtoMessage()

func (*LogStreamDescriptor) Reset Uses

func (m *LogStreamDescriptor) Reset()

func (*LogStreamDescriptor) String Uses

func (m *LogStreamDescriptor) String() string

func (*LogStreamDescriptor) Validate Uses

func (d *LogStreamDescriptor) Validate(prefix bool) error

Validate returns an error if the supplied LogStreamDescriptor is not complete and valid.

If prefix is true, the Prefix field will be validated; otherwise, it will be ignored. This can be useful when attempting to validate a LogStreamDescriptor before the application-assigned Prefix is known.

func (*LogStreamDescriptor) XXX_DiscardUnknown Uses

func (m *LogStreamDescriptor) XXX_DiscardUnknown()

func (*LogStreamDescriptor) XXX_Marshal Uses

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

func (*LogStreamDescriptor) XXX_Merge Uses

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

func (*LogStreamDescriptor) XXX_Size Uses

func (m *LogStreamDescriptor) XXX_Size() int

func (*LogStreamDescriptor) XXX_Unmarshal Uses

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

type StreamType Uses

type StreamType int32

A log stream type.

const (
    StreamType_TEXT     StreamType = 0
    StreamType_BINARY   StreamType = 1
    StreamType_DATAGRAM StreamType = 2
)

func (StreamType) EnumDescriptor Uses

func (StreamType) EnumDescriptor() ([]byte, []int)

func (StreamType) String Uses

func (x StreamType) String() string

type Text Uses

type Text struct {
    Lines                []*Text_Line `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"`
    XXX_NoUnkeyedLiteral struct{}     `json:"-"`
    XXX_unrecognized     []byte       `json:"-"`
    XXX_sizecache        int32        `json:"-"`
}

Text stream content.

func (*Text) Descriptor Uses

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

func (*Text) GetLines Uses

func (m *Text) GetLines() []*Text_Line

func (*Text) ProtoMessage Uses

func (*Text) ProtoMessage()

func (*Text) Reset Uses

func (m *Text) Reset()

func (*Text) String Uses

func (m *Text) String() string

func (*Text) XXX_DiscardUnknown Uses

func (m *Text) XXX_DiscardUnknown()

func (*Text) XXX_Marshal Uses

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

func (*Text) XXX_Merge Uses

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

func (*Text) XXX_Size Uses

func (m *Text) XXX_Size() int

func (*Text) XXX_Unmarshal Uses

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

type Text_Line Uses

type Text_Line struct {
    // The line's text content, not including its delimiter.
    Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
    //
    // The line's delimiter string.
    //
    // If this is an empty string, this line is continued in the next sequential
    // line, and the line's sequence number does not advance.
    Delimiter            string   `protobuf:"bytes,2,opt,name=delimiter,proto3" json:"delimiter,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Contiguous text lines and their delimiters.

func (*Text_Line) Descriptor Uses

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

func (*Text_Line) GetDelimiter Uses

func (m *Text_Line) GetDelimiter() string

func (*Text_Line) GetValue Uses

func (m *Text_Line) GetValue() []byte

func (*Text_Line) ProtoMessage Uses

func (*Text_Line) ProtoMessage()

func (*Text_Line) Reset Uses

func (m *Text_Line) Reset()

func (*Text_Line) String Uses

func (m *Text_Line) String() string

func (*Text_Line) XXX_DiscardUnknown Uses

func (m *Text_Line) XXX_DiscardUnknown()

func (*Text_Line) XXX_Marshal Uses

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

func (*Text_Line) XXX_Merge Uses

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

func (*Text_Line) XXX_Size Uses

func (m *Text_Line) XXX_Size() int

func (*Text_Line) XXX_Unmarshal Uses

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

Package logpb imports 8 packages (graph) and is imported by 60 packages. Updated 2018-10-19. Refresh now. Tools for package owners.