storage

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: May 12, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogRoot = "/data/logs"

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Start()
	Write(string, string) error
	Read(string, int) ([]string, error)
	Chan(context.Context, string, int) (chan string, error)
	Destroy(string) error
	Reopen() error
	Stop()
}

Adapter is an interface for pluggable components that store log messages.

func NewAdapter

func NewAdapter(adapterType string, numLines int) (Adapter, error)

NewAdapter returns a pointer to an appropriate implementation of the Adapter interface, as determined by the adapterType string it is passed.

func NewFileAdapter

func NewFileAdapter() (Adapter, error)

NewFileAdapter returns an Adapter that uses a file.

func NewValkeyStorageAdapter added in v1.3.7

func NewValkeyStorageAdapter(bufferSize int) (Adapter, error)

NewValkeyStorageAdapter returns a pointer to a new instance of a valkey-based storage.Adapter.

Jump to

Keyboard shortcuts

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