lsmview

package
v2.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateURL

func GenerateURL(data Data) (url.URL, error)

GenerateURL generates a URL showing the LSM diagram. The URL contains the encoded and compressed data as the URL fragment.

Types

type Data

type Data struct {
	// LSM levels in newest-to-oldest order.
	Levels []Level `json:"levels"`

	// Keys contains all table boundary keys, in sorted key order.
	Keys []string `json:"keys"`
}

Data encodes the data necessary to generate an LSM diagram.

type Level

type Level struct {
	Name   string  `json:"level_name"`
	Tables []Table `json:"tables"`
}

Level contains the data for a level of the LSM.

type Table

type Table struct {
	Label string `json:"label"`
	Size  uint64 `json:"size"`
	// SmallestKey, LargestKey are indexes into the Data.Keys list.
	SmallestKey int      `json:"smallest_key"`
	LargestKey  int      `json:"largest_key"`
	Details     []string `json:"details"`
}

Table contains the data for a table.

Jump to

Keyboard shortcuts

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