options

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 17 Imported by: 0

Documentation

Overview

Package options is redis configuration parameters.

Index

Constants

View Source
const (
	RetParseConfigFail   = 30012 // Configuration parsing failed.
	MaxConnectionsPreCPU = 250   // The maximum number of connections to a single cpu core.

	RedisSelectorName  = "redis"  // redis
	RedissSelectorName = "rediss" // redis security.
)

Constant.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Namespace string // Namespaces.
	Service   string // Called service name.

	RedisOption *redis.UniversalOptions
	QueryOption *pb.QueryOptions
	// contains filtered or unexported fields
}

Options is redis configuration parameters.

func New

func New(trpcOption *client.Options) (*Options, error)

New handles configuration parameter parsing. redis.ParseURL: https://github.com/redis/go-redis/blob/v9.0.2/options.go#L222 redis.ParseClusterURL: https://github.com/redis/go-redis/blob/v9.0.2/cluster.go#L137

Jump to

Keyboard shortcuts

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