redis

package
v0.0.0-...-8d187f3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, cfg Config) (err error)

Types

type Client

type Client struct {
	ResourceAPI       redis.UniversalClient
	DimensionResource redis.UniversalClient
	GenesisSync       redis.UniversalClient
	Config            *Config
}

func GetClient

func GetClient() *Client

type Config

type Config struct {
	ResourceAPIDatabase       int      `default:"1" yaml:"resource_api_database"`
	DimensionResourceDatabase int      `default:"2" yaml:"dimension_resource_database"`
	GenesisSyncDatabase       int      `default:"4" yaml:"genesis_sync_database"`
	ResourceAPIExpireInterval int      `default:"3600" yaml:"resource_api_expire_interval"`
	Host                      []string `default:"" yaml:"host"` // TODO add default value
	Port                      uint32   `default:"6379" yaml:"port"`
	Password                  string   `default:"deepflow" yaml:"password"`
	TimeOut                   uint32   `default:"30" yaml:"timeout"`
	Enabled                   bool     `default:"false" yaml:"enabled"`
	ClusterEnabled            bool     `default:"false" yaml:"cluster_enabled"`
}

func GetConfig

func GetConfig() *Config

Jump to

Keyboard shortcuts

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