olric

package
v0.69.13 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps an Olric cluster client for distributed cache operations

func NewClient

func NewClient(cfg Config, logger *zap.Logger) (*Client, error)

NewClient creates a new Olric client wrapper

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

Close closes the Olric client connection

func (*Client) GetClient

func (c *Client) GetClient() olriclib.Client

GetClient returns the underlying Olric client

func (*Client) Health

func (c *Client) Health(ctx context.Context) error

Health checks if the Olric client is healthy

type Config

type Config struct {
	// Servers is a list of Olric server addresses (e.g., ["localhost:3320"])
	// If empty, defaults to ["localhost:3320"]
	Servers []string

	// Timeout is the timeout for client operations
	// If zero, defaults to 10 seconds
	Timeout time.Duration
}

Config holds configuration for the Olric client

Jump to

Keyboard shortcuts

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