olric

package
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 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

func (*Client) UnderlyingClient added in v0.90.0

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

UnderlyingClient returns the underlying olriclib.Client for advanced usage. This is useful when you need to pass the client to other packages that expect the raw olric client interface.

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