logstream

package
v0.0.0-...-16dfdc2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLogStreamNameValid

func IsLogStreamNameValid(name string) bool

log stream name must match [a-zA-Z0-9_:]+

Types

type Entry

type Entry struct {
	Offset int64
	Data   []byte
}

type IndexFile

type IndexFile struct {
	IndexName string `json:"index_name"`
	//if this index corresponding segment is last segment,only read EndPos(include).
	//Otherwise read the whole file.
	EndPos   int64  `json:"end_pos"`
	Checksum string `json:"index_checksum"`
}

type SegmentFile

type SegmentFile struct {
	//the segment raft log name
	SegmentName      string `json:"segment_name"`
	SegmentSizeBytes int64  `json:"segment_size_bytes"` //the max size of segment file
	//this segment is the last segment in snapshot or not
	//true:last segment, false means before last segment
	IsLastSegment bool `json:"is_last_segment"`
	//if IsLastSegment is true,only read EndPos(include).
	//Otherwise read the whole file
	EndPos int64 `json:"end_pos"`

	FirstVindex int64  `json:"first_vindex"`
	FirstRindex uint64 `json:"first_rindex"`
	LastVindex  int64  `json:"last_vindex"`
	LastRindex  uint64 `json:"last_rindex"`

	Checksum string `json:"segment_checksum"`
	Index    *IndexFile
}

metadata for snapshot

Jump to

Keyboard shortcuts

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