loader

package
v0.0.0-...-799489d Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRedisKey = "gost"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	Load(context.Context) (io.Reader, error)
	Close() error
}

func FileLoader

func FileLoader(filename string) Loader

FileLoader loads data from file.

func RedisHashLoader

func RedisHashLoader(addr string, opts ...RedisLoaderOption) Loader

RedisHashLoader loads data from redis hash.

func RedisSetLoader

func RedisSetLoader(addr string, opts ...RedisLoaderOption) Loader

RedisSetLoader loads data from redis set.

type RedisLoaderOption

type RedisLoaderOption func(opts *redisLoaderOptions)

func DBRedisLoaderOption

func DBRedisLoaderOption(db int) RedisLoaderOption

func KeyRedisLoaderOption

func KeyRedisLoaderOption(key string) RedisLoaderOption

func PasswordRedisLoaderOption

func PasswordRedisLoaderOption(password string) RedisLoaderOption

Jump to

Keyboard shortcuts

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