server

package
v0.0.0-...-96430a3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurPath

func GetCurPath() (string, error)

Types

type Config

type Config struct {
	RetentionDuration uint64

	IndexBufferNum int

	IndexBufferLength int

	DataDir string

	MaxBlockDuration int64

	FlushWritecoldDuration int

	DefaultCacheSnapshotMemorySize int

	SkipInterval int
}

type Log

type Log struct {
	T int64  `json:"timestamp"`
	V uint64 `json:"id"`
	B string `json:"log"`
}

type Series

type Series struct {
	Metric     labels.Labels `json:"metric"`
	Logs       []Log         `json:"logs"`
	TotalCount int64         `json:"total_count"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

服务

func New

func New() *Server

func (*Server) Index

func (s *Server) Index(b []byte) error

func (*Server) Read

func (s *Server) Read(req *prompb.ReadRequest) *prompb.ReadResponse

func (*Server) Search

func (s *Server) Search(input string, mint, maxt, count int64) ([]byte, error)

Jump to

Keyboard shortcuts

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