client

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientArgs

type ClientArgs struct {
	Host     string
	Port     string
	Instance valkey.Client
}

func (*ClientArgs) InitClient

func (r *ClientArgs) InitClient(ctx context.Context) error

InitClient creates a new Valkey client or reuses an existing one from the cache. It takes a context.Context as input and uses the ClientArgs receiver to access the Host and Port fields. The Valkey client is created with the specified Valkey address if not already in the cache. It then sends a PING command to the Valkey server to check the connection. The function returns any error encountered during client creation or the PING command.

Jump to

Keyboard shortcuts

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